Class: StoreModel::Types::Hash
- Defined in:
- lib/store_model/types/hash.rb
Overview
Implements ActiveModel::Type::Value type for handling a hash of StoreModel::Model
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(model_klass) ⇒ StoreModel::Types::Hash
constructor
Initializes type for model class.
-
#type ⇒ Symbol
Returns type.
Methods inherited from HashBase
#cast_value, #changed_in_place?, #serialize
Constructor Details
#initialize(model_klass) ⇒ StoreModel::Types::Hash
Initializes type for model class
15 16 17 18 |
# File 'lib/store_model/types/hash.rb', line 15 def initialize(model_klass) @model_klass = model_klass super() end |
Instance Method Details
#type ⇒ Symbol
Returns type
23 24 25 |
# File 'lib/store_model/types/hash.rb', line 23 def type :hash end |