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, #config, #curry_args, #input, #relation, #result, #source, #type
Instance Method Summary collapse
Methods inherited from Command
#after_hooks, #before_hooks, #call, #combine, #curried?, #curry, extend_for_relation, #gateway, #graph?, #hooks?, #lazy?, #many?, #map_input_tuples, #name, #new, #one?, relation_methods_mod, #restrictible?, setting_mapping
Methods included from Plugins::ClassMethods
Methods included from Initializer
Methods included from Command::ClassInterface
#[], #adapter, #adapter_namespace, #after, #before, #build, #create_class, #default_name, extended, #inherited, #set_hooks
Methods included from Command::Restrictable
Methods included from Notifications::Listener
Methods included from Pipeline::Operator
Instance Method Details
#execute(params) ⇒ Object
38 39 40 41 |
# File 'lib/rom/memory/commands.rb', line 38 def execute(params) attributes = input[params] relation.map { |tuple| tuple.update(attributes.to_h) } end |