Class: Mongoid::Collections::Master

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/collections/master.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(master, name) ⇒ Master

Create the new database writer. Will create a collection from the master database.

Example:

Master.new(master, "mongoid_people")



24
25
26
# File 'lib/mongoid/collections/master.rb', line 24

def initialize(master, name)
  @collection = master.collection(name)
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



6
7
8
# File 'lib/mongoid/collections/master.rb', line 6

def collection
  @collection
end