Sha256: 026d4b9e291bc1d73af4bd5af950fbd3d79575ab2f33e03d3d96c67b399e0e48

Contents?: true

Size: 490 Bytes

Versions: 13

Compression:

Stored size: 490 Bytes

Contents

module CsvImporters
  class <%= klass %>Importer < Effective::CSVImporter
    def columns
      {<% columns.each_with_index do |column, index| %>
        <%= column.to_s.underscore.tap { |name| [' ', '/', '(', ')', '__'].each { |str| name.gsub!(str, '_') } }.to_sym %>: <%= (letters[index] || index) %><%= ',' unless (index+1) == columns.length %><% end %>
      }
    end

    def process_row
      # assign_columns(<%= klass.singularize %>.new).save!
      raise 'todo'
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
effective_developer-0.4.9 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.8 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.7 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.6 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.5 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.4 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.3 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.2 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.1 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.0 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.3.0 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.2.14 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.2.13 lib/scaffolds/importers/csv_importer.rb