Class: ROM::Memory::Commands::Delete

Inherits:
Commands::Delete show all
Defined in:
lib/rom/memory/commands.rb

Overview

In-memory delete command

Constant Summary

Constants inherited from Command

Command::CommandType, Command::Result

Instance Attribute Summary

Attributes inherited from Command

#after, #before, #curry_args, #input, #relation, #result, #source, #type

Instance Method Summary collapse

Methods inherited from Command

adapter, #after_hooks, #before_hooks, #call, #combine, #curried?, #curry, #gateway, #graph?, #hooks?, #lazy?, #many?, #map_input_tuples, #name, #new, #one?, register_as, relation, restrictable, #restrictible?

Methods included from Initializer

extended

Methods included from Command::ClassInterface

#[], #adapter_namespace, #after, #before, #build, #create_class, #default_name, #extend_for_relation, extended, #inherited, #options, #relation_methods_mod, #set_hooks, #use

Methods included from Pipeline::Operator

#>>

Instance Method Details

#executeObject

See Also:

  • Commands::Delete#execute


47
48
49
50
51
52
# File 'lib/rom/memory/commands.rb', line 47

def execute
  relation.to_a.map do |tuple|
    source.delete(tuple)
    tuple
  end
end