Class: MongoidSerializableModel
- Inherits:
-
Object
- Object
- MongoidSerializableModel
- Includes:
- GlobalID::Identification
- Defined in:
- app/models/mongoid_serializable_model.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(model) ⇒ MongoidSerializableModel
constructor
A new instance of MongoidSerializableModel.
- #to_global_id ⇒ Object
Constructor Details
#initialize(model) ⇒ MongoidSerializableModel
Returns a new instance of MongoidSerializableModel.
7 8 9 |
# File 'app/models/mongoid_serializable_model.rb', line 7 def initialize(model) @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
4 5 6 |
# File 'app/models/mongoid_serializable_model.rb', line 4 def model @model end |
Instance Method Details
#to_global_id ⇒ Object
11 12 13 |
# File 'app/models/mongoid_serializable_model.rb', line 11 def to_global_id model.to_global_id end |