Method: Sequel::Plugins::CsvSerializer::ClassMethods#array_from_csv
- Defined in:
- lib/sequel/plugins/csv_serializer.rb
permalink #array_from_csv(csv, opts = OPTS) ⇒ Object
Attempt to parse an array of instances from the given CSV string
99 100 101 102 103 104 105 |
# File 'lib/sequel/plugins/csv_serializer.rb', line 99 def array_from_csv(csv, opts = OPTS) CsvSerializer.csv_call(:parse, csv, process_csv_serializer_opts(opts)).map do |row| row = row.to_hash row.delete(nil) new(row) end end |