Class: ROM::Mongo::Commands::Delete

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

Instance Method Summary collapse

Instance Method Details

#executeObject



37
38
39
40
41
# File 'lib/rom/mongo/commands.rb', line 37

def execute
  removed = relation.to_a
  relation.dataset.remove_all
  removed
end