Class: Dynamoid::TransactionWrite::UpdateAttributes

Inherits:
Base
  • Object
show all
Defined in:
lib/dynamoid/transaction_write/update_attributes.rb

Instance Method Summary collapse

Constructor Details

#initialize(model, attributes, **options) ⇒ UpdateAttributes

Returns a new instance of UpdateAttributes.



9
10
11
12
13
14
15
# File 'lib/dynamoid/transaction_write/update_attributes.rb', line 9

def initialize(model, attributes, **options)
  super()

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

Instance Method Details

#aborted?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/dynamoid/transaction_write/update_attributes.rb', line 29

def aborted?
  @save_action.aborted?
end

#action_requestObject



41
42
43
# File 'lib/dynamoid/transaction_write/update_attributes.rb', line 41

def action_request
  @save_action.action_request
end

#observable_by_user_resultObject



37
38
39
# File 'lib/dynamoid/transaction_write/update_attributes.rb', line 37

def observable_by_user_result
  @save_action.observable_by_user_result
end

#on_commitObject



21
22
23
# File 'lib/dynamoid/transaction_write/update_attributes.rb', line 21

def on_commit
  @save_action.on_commit
end

#on_registrationObject



17
18
19
# File 'lib/dynamoid/transaction_write/update_attributes.rb', line 17

def on_registration
  @save_action.on_registration
end

#on_rollbackObject



25
26
27
# File 'lib/dynamoid/transaction_write/update_attributes.rb', line 25

def on_rollback
  @save_action.on_rollback
end

#skipped?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/dynamoid/transaction_write/update_attributes.rb', line 33

def skipped?
  @save_action.skipped?
end