module MongoModel
MongoModel::InstrumentedCursor
& MongoModel::InstrumentedCollection
are wrappers around Mongo::Cursor & Mongo::Collection respectively to add in support for ActiveSupport notifications.
They are primarily used in MongoModel
to implement logging.
Constants
- VERSION
Public Class Methods
configuration()
click to toggle source
# File lib/mongomodel.rb, line 102 def self.configuration @_configuration ||= Configuration.defaults end
configuration=(config)
click to toggle source
# File lib/mongomodel.rb, line 106 def self.configuration=(config) @_database = nil @_configuration = case config when Hash Configuration.new(config) when String URIConfiguration.new(config) end end
database()
click to toggle source
# File lib/mongomodel.rb, line 116 def self.database @_database ||= configuration.establish_connection end