Class: QDM::Entity

Inherits:
Attribute show all
Includes:
Mongoid::Document
Defined in:
app/models/qdm/attributes/entity.rb

Overview

app/models/qdm/entity.rb

Instance Method Summary collapse

Methods inherited from Attribute

demongoize, #get, #mongoize, mongoize, #to_json

Constructor Details

#initialize(options = {}) ⇒ Entity

Returns a new instance of Entity.



9
10
11
12
13
# File 'app/models/qdm/attributes/entity.rb', line 9

def initialize(options = {})
  super(options)
  # default id to the mongo ObjectId for this DataElement if it isnt already defined
  self.id = _id.to_s unless id?
end