Module: Mongo::Model

Includes:
Object
Defined in:
lib/mongo/model/model.rb,
lib/mongo/model.rb,
lib/mongo/model.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.connectionObject

Returns the value of attribute connection.



10
11
12
# File 'lib/mongo/model/model.rb', line 10

def connection
  @connection
end

.dbObject

Returns the value of attribute db.



10
11
12
# File 'lib/mongo/model/model.rb', line 10

def db
  @db
end

Instance Attribute Details

#_classObject

Returns the value of attribute _class.



4
5
6
# File 'lib/mongo/model/model.rb', line 4

def _class
  @_class
end

#_idObject

Returns the value of attribute _id.



4
5
6
# File 'lib/mongo/model/model.rb', line 4

def _id
  @_id
end

Instance Method Details

#_id?Boolean

Returns:



6
# File 'lib/mongo/model/model.rb', line 6

def _id?; !!_id end

#new_record?Boolean

Returns:



7
# File 'lib/mongo/model/model.rb', line 7

def new_record?; !_id end