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.
9 10 11 |
# File 'build/mongoid-8.1/lib/mongoid/contextual/command.rb', line 9 def collection @collection end |
#collection The collection to query against.(Thecollectiontoqueryagainst.) ⇒ Object (readonly)
9 |
# File 'build/mongoid-8.1/lib/mongoid/contextual/command.rb', line 9 attr_reader :collection, :criteria |
#criteria ⇒ Object (readonly)
Returns the value of attribute criteria.
9 10 11 |
# File 'build/mongoid-8.1/lib/mongoid/contextual/command.rb', line 9 def criteria @criteria end |
#criteria The criteria for the context.(Thecriteria) ⇒ Object (readonly)
9 |
# File 'build/mongoid-8.1/lib/mongoid/contextual/command.rb', line 9 attr_reader :collection, :criteria |
Instance Method Details
#client ⇒ Mongo::Client
Get the database client.
27 28 29 |
# File 'build/mongoid-8.1/lib/mongoid/contextual/command.rb', line 27 def client collection.database.client end |
#command ⇒ Hash
The database command that is being built to send to the db.
17 18 19 |
# File 'build/mongoid-8.1/lib/mongoid/contextual/command.rb', line 17 def command @command ||= {} end |