Class: Mongo::DelegatingDatabase
- Inherits:
-
Object
- Object
- Mongo::DelegatingDatabase
- Includes:
- FromHash
- Defined in:
- lib/mongo_delegate/delegating_database.rb
Instance Attribute Summary collapse
-
#local ⇒ Object
Returns the value of attribute local.
-
#remote ⇒ Object
Returns the value of attribute remote.
Instance Method Summary collapse
Instance Attribute Details
#local ⇒ Object
Returns the value of attribute local.
3 4 5 |
# File 'lib/mongo_delegate/delegating_database.rb', line 3 def local @local end |
#remote ⇒ Object
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 |