column_separator()
click to toggle source
def column_separator
@column_separator
end
field_size_limit()
click to toggle source
def field_size_limit
@field_size_limit
end
liberal_parsing?()
click to toggle source
def liberal_parsing?
@liberal_parsing
end
line()
click to toggle source
lineno()
click to toggle source
parse(&block)
click to toggle source
def parse(&block)
return to_enum(__method__) unless block_given?
if @return_headers and @headers and @raw_headers
headers = Row.new(@headers, @raw_headers, true)
if @unconverted_fields
headers = add_unconverted_fields(headers, [])
end
yield headers
end
begin
@scanner ||= build_scanner
if quote_character.nil?
parse_no_quote(&block)
elsif @need_robust_parsing
parse_quotable_robust(&block)
else
parse_quotable_loose(&block)
end
rescue InvalidEncoding
if @scanner
ignore_broken_line
lineno = @lineno
else
lineno = @lineno + 1
end
message = "Invalid byte sequence in #{@encoding}"
raise MalformedCSVError.new(message, lineno)
end
end
quote_character()
click to toggle source
def quote_character
@quote_character
end
row_separator()
click to toggle source
def row_separator
@row_separator
end
skip_blanks?()
click to toggle source
def skip_blanks?
@skip_blanks
end
skip_lines()
click to toggle source
def skip_lines
@skip_lines
end
unconverted_fields?()
click to toggle source
def unconverted_fields?
@unconverted_fields
end