Method: Chop::Create#initialize

Defined in:
lib/chop/create.rb

#initialize(&other_block) ⇒ Create

Returns a new instance of Create.



33
34
35
36
37
38
39
40
# File 'lib/chop/create.rb', line 33

def initialize(*, &other_block)
  super
  self.transformations = []
  self.deferred_attributes = HashWithIndifferentAccess.new
  self.after_hooks = []
  instance_eval &block if block.respond_to?(:call)
  instance_eval &other_block if block_given?
end