Class: ImportEverything::CsvParser
- Defined in:
- lib/import_everything/parsers/csv_parser.rb
Direct Known Subclasses
Instance Method Summary collapse
- #required_fields ⇒ Object
-
#value_hashes ⇒ Object
Generates the value hashes.
Instance Method Details
#required_fields ⇒ Object
14 15 16 |
# File 'lib/import_everything/parsers/csv_parser.rb', line 14 def required_fields [] end |
#value_hashes ⇒ Object
Generates the value hashes
6 7 8 9 10 11 12 13 |
# File 'lib/import_everything/parsers/csv_parser.rb', line 6 def value_hashes require 'csv' res = [] CSV.parse(str, :headers => true, :col_sep => delimiter) do |row| res << row.to_hash end res end |