Class: Dynamoid::Persistence::ItemUpdaterWithDumping
- Inherits:
-
Object
- Object
- Dynamoid::Persistence::ItemUpdaterWithDumping
- Defined in:
- lib/dynamoid/persistence/item_updater_with_dumping.rb
Instance Method Summary collapse
- #add(attributes) ⇒ Object
-
#initialize(model_class, item_updater) ⇒ ItemUpdaterWithDumping
constructor
A new instance of ItemUpdaterWithDumping.
- #set(attributes) ⇒ Object
Constructor Details
#initialize(model_class, item_updater) ⇒ ItemUpdaterWithDumping
Returns a new instance of ItemUpdaterWithDumping.
7 8 9 10 |
# File 'lib/dynamoid/persistence/item_updater_with_dumping.rb', line 7 def initialize(model_class, item_updater) @model_class = model_class @item_updater = item_updater end |
Instance Method Details
#add(attributes) ⇒ Object
12 13 14 |
# File 'lib/dynamoid/persistence/item_updater_with_dumping.rb', line 12 def add(attributes) @item_updater.add(dump(attributes)) end |
#set(attributes) ⇒ Object
16 17 18 |
# File 'lib/dynamoid/persistence/item_updater_with_dumping.rb', line 16 def set(attributes) @item_updater.set(dump(attributes)) end |