Class: Rom::Dynamo::Commands::Delete

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

Overview

DynamoDB delete command

Instance Method Summary collapse

Instance Method Details

#datasetObject



42
43
44
# File 'lib/rom/dynamo/commands.rb', line 42

def dataset
  relation.dataset
end

#executeObject



36
37
38
39
40
# File 'lib/rom/dynamo/commands.rb', line 36

def execute
  relation.to_a.tap do |tuples|
    tuples.each { |t| dataset.delete(t) }
  end
end