Class: Depository::Database

Inherits:
Object
  • Object
show all
Defined in:
lib/depository/database.rb

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Object



18
19
20
# File 'lib/depository/database.rb', line 18

def [](name)
  self.db[name]
end

.db_for(collection) ⇒ Object



14
15
16
# File 'lib/depository/database.rb', line 14

def db_for(collection)
  Result.new(self.db[collection._db_name], collection)
end

.use_db(db) ⇒ Object



10
11
12
# File 'lib/depository/database.rb', line 10

def use_db(db)
  self.db = db
end