Sha256: f7939c736b0e03a5c5b970413b7c2bf909e8fcfeb9c24b54bcd0572abe062036
Contents?: true
Size: 710 Bytes
Versions: 18
Compression:
Stored size: 710 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Collections #:nodoc: class Master include Mimic attr_reader :collection # All read and write operations should delegate to the master connection. # These operations mimic the methods on a Mongo:Collection. # # Example: # # <tt>collection.save({ :name => "Al" })</tt> proxy(:collection, Operations::ALL) # Create the new database writer. Will create a collection from the # master database. # # Example: # # <tt>Master.new(master, "mongoid_people")</tt> def initialize(master, name) @collection = master.collection(name) end end end end
Version data entries
18 entries across 18 versions & 2 rubygems