Class: Cuprum::Collections::Adapters::HashAdapter
- Inherits:
-
Cuprum::Collections::Adapter
- Object
- Cuprum::Collections::Adapter
- Cuprum::Collections::Adapters::HashAdapter
- Defined in:
- lib/cuprum/collections/adapters/hash_adapter.rb
Overview
Utility class for converting between raw attributes and a data Hash.
Instance Attribute Summary
Attributes inherited from Cuprum::Collections::Adapter
#attribute_names, #default_contract, #entity_class
Instance Method Summary collapse
-
#initialize(**options) ⇒ HashAdapter
constructor
A new instance of HashAdapter.
Methods inherited from Cuprum::Collections::Adapter
#allow_extra_attributes?, #build, #merge, #serialize, #validate, #validate_attributes_parameter, #validate_entity_parameter
Constructor Details
#initialize(**options) ⇒ HashAdapter
Returns a new instance of HashAdapter.
18 19 20 21 22 23 24 |
# File 'lib/cuprum/collections/adapters/hash_adapter.rb', line 18 def initialize(**) if [:entity_class] raise ArgumentError, 'adapter does not support entity class' end super(entity_class: Hash, **) end |