Bug #7319 ยป ruby-doc-csv_skip_comments.patch
lib/csv.rb | ||
---|---|---|
init_converters(options, :header_converters)
|
||
end
|
||
#
|
||
# Stores the pattern of comments to skip, from the options provided, (:skip_lines)
|
||
#
|
||
# The pattern must respond to .match, else ArgumentError is raised.
|
||
#
|
||
# See also CSV.new
|
||
#
|
||
def init_comments(options)
|
||
@skip_lines = options.delete(:skip_lines)
|
||
if @skip_lines and not @skip_lines.respond_to?(:match)
|
||
raise ArgumentError, ":skip_lines has to respond to matches"
|
||
end
|
||
end
|
||
#
|
||
# The actual work method for adding converters, used by both CSV.convert() and
|
||
# CSV.header_convert().
|