Class: Mongoid::Collections::Master
- Includes:
- Retry
- Defined in:
- lib/mongoid/collections/master.rb
Overview
This class wraps the MongoDB master database.
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
Instance Method Summary collapse
-
#initialize(master, name, options = {}) ⇒ Master
constructor
Create the new database writer.
Methods included from Retry
Constructor Details
#initialize(master, name, options = {}) ⇒ Master
Create the new database writer. Will create a collection from the master database.
40 41 42 |
# File 'lib/mongoid/collections/master.rb', line 40 def initialize(master, name, = {}) @collection = master.create_collection(name, ) end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
9 10 11 |
# File 'lib/mongoid/collections/master.rb', line 9 def collection @collection end |