Sha256: f501d3b0218202de927c927a8bd1f91d1437a2c1836fb6d1d4745ce273373f12
Contents?: true
Size: 504 Bytes
Versions: 31
Compression:
Stored size: 504 Bytes
Contents
require 'mongo' module Volt class DataStore class MongoDriver def self.fetch if Volt.config.db_uri.present? @@mongo_db ||= Mongo::MongoClient.from_uri(Volt.config.db_uri) @@db ||= @@mongo_db.db(Volt.config.db_uri.split('/').last || Volt.config.db_name) else @@mongo_db ||= Mongo::MongoClient.new(Volt.config.db_host, Volt.config.db_path) @@db ||= @@mongo_db.db(Volt.config.db_name) end @@db end end end end
Version data entries
31 entries across 31 versions & 1 rubygems