Module: Mongoid::Contextual::Command
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
-
#client ⇒ Mongo::Client
Get the database client.
-
#command ⇒ Hash
The database command that is being built to send to the db.
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
10 11 12 |
# File 'lib/mongoid/contextual/command.rb', line 10 def collection @collection end |
#collection The collection to query against.(Thecollectiontoqueryagainst.) ⇒ Object (readonly)
10 |
# File 'lib/mongoid/contextual/command.rb', line 10 attr_reader :collection, :criteria |
#criteria ⇒ Object (readonly)
Returns the value of attribute criteria.
10 11 12 |
# File 'lib/mongoid/contextual/command.rb', line 10 def criteria @criteria end |
#criteria The criteria for the context.(Thecriteria) ⇒ Object (readonly)
10 |
# File 'lib/mongoid/contextual/command.rb', line 10 attr_reader :collection, :criteria |
Instance Method Details
#client ⇒ Mongo::Client
Get the database client.
32 33 34 |
# File 'lib/mongoid/contextual/command.rb', line 32 def client collection.database.client end |
#command ⇒ Hash
The database command that is being built to send to the db.
20 21 22 |
# File 'lib/mongoid/contextual/command.rb', line 20 def command @command ||= {} end |