lib/koine/csv/named_columns_parser.rb in koine-csv-0.2.1 vs lib/koine/csv/named_columns_parser.rb in koine-csv-0.2.2
- old
+ new
@@ -2,10 +2,11 @@
module Koine
module Csv
class NamedColumnsParser < CsvParser
def parse(contents, &block)
- csv = CSV.parse(contents, headers: true, col_sep: column_separator)
+ options = parser_options.merge({ headers: true })
+ csv = CSV.parse(contents, options)
column_names = csv.headers
collection = []
csv.each do |line|
element = {}