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.
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
#client ⇒ Mongo::Client
Get the database client.
30 31 32 |
# File 'lib/mongoid/contextual/command.rb', line 30 def client collection.database.client end |
#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 |