Class: MongoidSerializableModel

Inherits:
Object
  • Object
show all
Includes:
GlobalID::Identification
Defined in:
app/models/mongoid_serializable_model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#modelObject (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_idObject



11
12
13
# File 'app/models/mongoid_serializable_model.rb', line 11

def to_global_id
  model.to_global_id
end