Module: Mongoid::Contextual::Command
- Included in:
- FindAndModify, GeoNear, MapReduce, TextSearch
- Defined in:
- lib/mongoid/contextual/command.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
- #collection The collection to query against.(Thecollectiontoqueryagainst.) ⇒ Object readonly
-
#criteria ⇒ Object
readonly
Returns the value of attribute criteria.
- #criteria The criteria for the context.(Thecriteria) ⇒ Object readonly
Instance Method Summary collapse
-
#command ⇒ Hash
The database command that is being built to send to the db.
-
#session ⇒ Session
Get the database session.
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
8 9 10 |
# File 'lib/mongoid/contextual/command.rb', line 8 def collection @collection end |
#collection The collection to query against.(Thecollectiontoqueryagainst.) ⇒ Object (readonly)
8 |
# File 'lib/mongoid/contextual/command.rb', line 8 attr_reader :collection, :criteria |
#criteria ⇒ Object (readonly)
Returns the value of attribute criteria.
8 9 10 |
# File 'lib/mongoid/contextual/command.rb', line 8 def criteria @criteria end |
#criteria The criteria for the context.(Thecriteria) ⇒ Object (readonly)
8 |
# File 'lib/mongoid/contextual/command.rb', line 8 attr_reader :collection, :criteria |
Instance Method Details
#command ⇒ Hash
The database command that is being built to send to the db.
18 19 20 |
# File 'lib/mongoid/contextual/command.rb', line 18 def command @command ||= {} end |
#session ⇒ Session
Get the database session.
30 31 32 |
# File 'lib/mongoid/contextual/command.rb', line 30 def session collection.database.session end |