Module: Mongoid::Collections
- Extended by:
- ActiveSupport::Concern
- Included in:
- Components
- Defined in:
- lib/mongoid/collections.rb,
lib/mongoid/collections/retry.rb,
lib/mongoid/collections/master.rb,
lib/mongoid/collections/operations.rb
Overview
:nodoc:
Defined Under Namespace
Modules: ClassMethods, Operations, Retry Classes: Master
Instance Method Summary collapse
-
#collection ⇒ Collection
Get the collection for the class.
-
#db ⇒ DB
Get the database for the class.
Instance Method Details
#collection ⇒ Collection
Note:
Defining methods instead of delegate to avoid calls to Kernel.caller for class load performance reasons.
Get the collection for the class.
25 26 27 |
# File 'lib/mongoid/collections.rb', line 25 def collection self.class.collection end |
#db ⇒ DB
Note:
Defining methods instead of delegate to avoid calls to Kernel.caller for class load performance reasons.
Get the database for the class.
40 41 42 |
# File 'lib/mongoid/collections.rb', line 40 def db self.class.db end |