lib/csv_importer/config.rb in csv-importer-0.1.2 vs lib/csv_importer/config.rb in csv-importer-0.1.3
- old
+ new
@@ -5,8 +5,13 @@
attribute :model
attribute :column_definitions, Array[ColumnDefinition], default: proc { [] }
attribute :identifier, Symbol
attribute :when_invalid, Symbol, default: proc { :skip }
+ attribute :after_build_blocks, Array[Proc], default: []
+
+ def after_build(block)
+ self.after_build_blocks << block
+ end
end
end