Class: Mongo::DelegatingDatabase

Inherits:
Object
  • Object
show all
Includes:
FromHash
Defined in:
lib/mongo_delegate/delegating_database.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#localObject

Returns the value of attribute local.



3
4
5
# File 'lib/mongo_delegate/delegating_database.rb', line 3

def local
  @local
end

#remoteObject

Returns the value of attribute remote.



3
4
5
# File 'lib/mongo_delegate/delegating_database.rb', line 3

def remote
  @remote
end

Instance Method Details

#collection(name) ⇒ Object



5
6
7
# File 'lib/mongo_delegate/delegating_database.rb', line 5

def collection(name)
  DelegatingCollection.new(:local => local.collection(name), :remote => remote.collection(name))
end