Class: Lotus::Model::Mapping::CollectionCoercer Private
- Inherits:
-
Object
- Object
- Lotus::Model::Mapping::CollectionCoercer
- Defined in:
- lib/lotus/model/mapping/collection_coercer.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Translates values from/to the database with the corresponding Ruby type.
Instance Method Summary collapse
-
#from_record(record) ⇒ Object
private
Translates the given record into a Ruby object.
-
#initialize(collection) ⇒ CollectionCoercer
constructor
private
Initialize a coercer for the given collection.
-
#to_record(entity) ⇒ Hash
private
Translates the given entity into a format compatible with the database.
Constructor Details
#initialize(collection) ⇒ CollectionCoercer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a coercer for the given collection.
15 16 17 18 |
# File 'lib/lotus/model/mapping/collection_coercer.rb', line 15 def initialize(collection) @collection = collection _compile! end |
Instance Method Details
#from_record(record) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Translates the given record into a Ruby object.
39 40 |
# File 'lib/lotus/model/mapping/collection_coercer.rb', line 39 def from_record(record) end |
#to_record(entity) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Translates the given entity into a format compatible with the database.
28 29 |
# File 'lib/lotus/model/mapping/collection_coercer.rb', line 28 def to_record(entity) end |