Sha256: 2efb19302aec84f19b50f2ce45aca9fdbe6ef8e11c3c9e80b2ec587bd46a4d7b

Contents?: true

Size: 462 Bytes

Versions: 16

Compression:

Stored size: 462 Bytes

Contents

module ActiveRecordCSVImporter
  # The configuration of a ActiveRecordCSVImporter
  class Config
    include Virtus.model

    attribute :model
    attribute :column_definitions, Array[ColumnDefinition], default: proc { [] }
    attribute :on_duplicate_key, Hash, default: []
    attribute :batch_size, Integer, default: 500
    attribute :each_batch_blocks, Array[Proc], default: []

    def each_batch(block)
      each_batch_blocks << block
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
activerecord_csv_importer-0.4.0 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.3.0 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.2.3 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.2.2 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.2.1 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.2.0 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.9 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.8 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.7 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.6 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.5 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.4 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.3 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.2 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.1 lib/activerecord_csv_importer/config.rb
activerecord_csv_importer-0.1.0 lib/activerecord_csv_importer/config.rb