Module: Mongo::Model

Defined in:
lib/mongo_db/model/model.rb,
lib/mongo_db/model.rb,
lib/mongo_db/model.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.connectionObject

Returns the value of attribute connection.



8
9
10
# File 'lib/mongo_db/model/model.rb', line 8

def connection
  @connection
end

.dbObject

Returns the value of attribute db.



8
9
10
# File 'lib/mongo_db/model/model.rb', line 8

def db
  @db
end

Instance Attribute Details

#_classObject

Returns the value of attribute _class.



2
3
4
# File 'lib/mongo_db/model/model.rb', line 2

def _class
  @_class
end

#_idObject

Returns the value of attribute _id.



2
3
4
# File 'lib/mongo_db/model/model.rb', line 2

def _id
  @_id
end

Instance Method Details

#_id?Boolean

Returns:



4
# File 'lib/mongo_db/model/model.rb', line 4

def _id?; !!_id end

#new_record?Boolean

Returns:



5
# File 'lib/mongo_db/model/model.rb', line 5

def new_record?; !_id end