Method: Dynamoid::TransactionWrite::Create#initialize

Defined in:
lib/dynamoid/transaction_write/create.rb

#initialize(model_class, attributes = {}, **options, &block) ⇒ Create

Returns a new instance of Create.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/dynamoid/transaction_write/create.rb', line 8

def initialize(model_class, attributes = {}, **options, &block)
  super()

  @model = model_class.new(attributes)

  if block
    yield(@model)
  end

  @save_action = Save.new(@model, **options)
end