Note: Don’t use this class directly. This is an internal class.
# File csv/parser.rb, line 266 def column_separator @column_separator end
# File csv/parser.rb, line 278 def field_size_limit @field_size_limit end
# File csv/parser.rb, line 294 def header_row? @use_headers and @headers.nil? end
# File csv/parser.rb, line 306 def liberal_parsing? @liberal_parsing end
# File csv/parser.rb, line 318 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
# File csv/parser.rb, line 274 def quote_character @quote_character end
# File csv/parser.rb, line 298 def return_headers? @return_headers end
# File csv/parser.rb, line 270 def row_separator @row_separator end
# File csv/parser.rb, line 302 def skip_blanks? @skip_blanks end