Class: StoreModel::Types::Many
- Defined in:
- lib/store_model/types/many.rb
Overview
Implements ActiveModel::Type::Value type for handling an array of StoreModel::Model
Instance Method Summary collapse
-
#initialize(model_klass) ⇒ StoreModel::Types::Many
constructor
Initializes type for model class.
-
#type ⇒ Symbol
Returns type.
Methods inherited from ManyBase
#cast_value, #changed_in_place?, #serialize
Constructor Details
#initialize(model_klass) ⇒ StoreModel::Types::Many
Initializes type for model class
15 16 17 |
# File 'lib/store_model/types/many.rb', line 15 def initialize(model_klass) @model_klass = model_klass end |
Instance Method Details
#type ⇒ Symbol
Returns type
22 23 24 |
# File 'lib/store_model/types/many.rb', line 22 def type :array end |