Class: Cuprum::Collections::Basic::Commands::BuildOne
- Inherits:
-
Cuprum::Collections::Basic::Command
- Object
- Cuprum::Command
- Command
- Cuprum::Collections::Basic::Command
- Cuprum::Collections::Basic::Commands::BuildOne
- Defined in:
- lib/cuprum/collections/basic/commands/build_one.rb
Overview
Command for generating a collection entity from an attributes hash.
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
Builds a new entity with the given attributes.
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
Builds a new entity with the given attributes.
34 35 36 37 |
# File 'lib/cuprum/collections/basic/commands/build_one.rb', line 34 validate_parameters :call do keyword :attributes, Stannum::Constraints::Types::HashWithIndifferentKeys.new end |