Module: Mongoid::Contextual::Command
- Included in:
- FindAndModify, MapReduce
- Defined in:
- lib/mongoid/contextual/command.rb
Instance Method Summary collapse
-
#command ⇒ Hash
The database command that is being built to send to the db.
-
#criteria ⇒ Criteria
Get the criteria for the command.
-
#session ⇒ Session
Get the database session.
Instance Method Details
#command ⇒ Hash
The database command that is being built to send to the db.
14 15 16 |
# File 'lib/mongoid/contextual/command.rb', line 14 def command @command ||= {} end |
#criteria ⇒ Criteria
Get the criteria for the command.
26 27 28 |
# File 'lib/mongoid/contextual/command.rb', line 26 def criteria @criteria end |
#session ⇒ Session
Get the database session.
38 39 40 |
# File 'lib/mongoid/contextual/command.rb', line 38 def session criteria.klass.mongo_session end |