Class: ROM::DynamoDB::Commands::Delete

Inherits:
Commands::Delete
  • Object
show all
Defined in:
lib/rom/dynamodb/commands/delete.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



7
8
9
# File 'lib/rom/dynamodb/commands/delete.rb', line 7

def execute
  relation.to_a.collect(&method(:with_tuple))
end

#with_tuple(tuple) ⇒ Object



11
12
13
14
# File 'lib/rom/dynamodb/commands/delete.rb', line 11

def with_tuple(tuple)
  data = tuple.is_a?(Hash) ? tuple : tuple.to_h
  source.delete(input[data])
end