Class: Cuprum::Collections::Basic::Commands::AssignOne
- Inherits:
-
Cuprum::Collections::Basic::Command
- Object
- Cuprum::Command
- Command
- Cuprum::Collections::Basic::Command
- Cuprum::Collections::Basic::Commands::AssignOne
- Defined in:
- lib/cuprum/collections/basic/commands/assign_one.rb
Overview
Command for assigning attributes to a collection entity.
Instance Attribute Summary
Attributes inherited from Cuprum::Collections::Basic::Command
#collection_name, #data, #default_contract, #member_name, #options, #primary_key_name, #primary_key_type
Instance Method Summary collapse
-
#call(attributes: , entity: ) ⇒ Hash
Assigns the given attributes to the entity.
Methods inherited from Cuprum::Collections::Basic::Command
Constructor Details
This class inherits a constructor from Cuprum::Collections::Basic::Command
Instance Method Details
#call(attributes: , entity: ) ⇒ Hash
Assigns the given attributes to the entity.
Any attributes on the entity that are not part of the given attributes hash are unchanged.
39 40 41 42 43 44 |
# File 'lib/cuprum/collections/basic/commands/assign_one.rb', line 39 validate_parameters :call do keyword :attributes, Stannum::Constraints::Types::HashWithIndifferentKeys.new keyword :entity, Stannum::Constraints::Types::HashWithStringKeys.new end |