Class: Dynamoid::Persistence::ItemUpdaterWithDumping

Inherits:
Object
  • Object
show all
Defined in:
lib/dynamoid/persistence/item_updater_with_dumping.rb

Instance Method Summary collapse

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