Class: Volt::DataStore::MongoDriver

Inherits:
Object
  • Object
show all
Defined in:
lib/volt/data_stores/mongo_driver.rb

Class Method Summary collapse

Class Method Details

.fetchObject



6
7
8
9
10
11
# File 'lib/volt/data_stores/mongo_driver.rb', line 6

def self.fetch
  @@mongo_db ||= Mongo::MongoClient.new(Volt.config.db_host, Volt.config.db_path)
  @@db ||= @@mongo_db.db(Volt.config.db_name)

  @@db
end