Class: Decidim::Admin::Import::Readers::CSV
- Defined in:
- lib/decidim/admin/import/readers/csv.rb
Overview
Imports any exported CSV file to local objects. It transforms the import data using the creator into the final target objects.
Constant Summary collapse
- MIME_TYPE =
"text/csv"
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Decidim::Admin::Import::Readers::Base
Instance Method Details
#read_rows ⇒ Object
14 15 16 17 18 |
# File 'lib/decidim/admin/import/readers/csv.rb', line 14 def read_rows ::CSV.read(file, col_sep: ";").each_with_index do |row, index| yield row, index end end |