Class: ROM::Memory::Commands::Update
- Inherits:
-
Commands::Update
- Object
- Command
- Commands::Update
- ROM::Memory::Commands::Update
- Defined in:
- lib/rom/memory/commands.rb
Overview
In-memory update 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
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
#execute(params) ⇒ Object
34 35 36 37 |
# File 'lib/rom/memory/commands.rb', line 34 def execute(params) attributes = input[params] relation.map { |tuple| tuple.update(attributes.to_h) } end |