Sha256: d98bcd3f61c07010fc4ea9b2008d9de70b3a03a40651f98b2df0d848fd8c7866
Contents?: true
Size: 514 Bytes
Versions: 3
Compression:
Stored size: 514 Bytes
Contents
module CSVImporter # This Dsl extends a class that includes CSVImporter # It is a thin proxy to the Config object module Dsl def model(model_klass) csv_importer_config.model = model_klass end def column(name, options={}) csv_importer_config.column_definitions << options.merge(name: name) end def identifier(identifier) csv_importer_config.identifier = identifier end def when_invalid(action) csv_importer_config.when_invalid = action end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
csv-importer-0.1.2 | lib/csv_importer/dsl.rb |
csv-importer-0.1.1 | lib/csv_importer/dsl.rb |
csv-importer-0.1.0 | lib/csv_importer/dsl.rb |