Sha256: 9189864d441bd78769313c3a4507089ed67bab645f0d241418a3c5be50f02394
Contents?: true
Size: 708 Bytes
Versions: 5
Compression:
Stored size: 708 Bytes
Contents
module AbstractImporter class ImportOptions CALLBACKS = [ :finder, :rescue, :rescue_batch, :before_build, :before_batch, :before_create, :before_update, :before_save, :after_create, :after_update, :after_save, :before_all, :after_all ] CALLBACKS.each do |callback| attr_reader :"#{callback}_callback" class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{callback}(sym=nil, &block) @#{callback}_callback = sym || block end RUBY end end end
Version data entries
5 entries across 5 versions & 1 rubygems