Module: StoreModel::TypeBuilders
- Defined in:
- lib/store_model/type_builders.rb
Overview
Contains methods for converting StoreModel::Model to ActiveModel::Type::Value.
Instance Method Summary collapse
-
#to_array_type ⇒ Types::Many
Converts StoreModel::Model to Types::Many.
-
#to_type ⇒ Types::One
Converts StoreModel::Model to Types::One.
Instance Method Details
#to_array_type ⇒ Types::Many
Converts StoreModel::Model to Types::Many
14 15 16 |
# File 'lib/store_model/type_builders.rb', line 14 def to_array_type Types::Many.new(self) end |
#to_type ⇒ Types::One
Converts StoreModel::Model to Types::One
8 9 10 |
# File 'lib/store_model/type_builders.rb', line 8 def to_type Types::One.new(self) end |