Class: Mongoid::Config::Database
- Defined in:
- lib/mongoid/config/database.rb
Overview
This class handles the configuration and initialization of a mongodb database from options.
Constant Summary collapse
- PRIVATE_OPTIONS =
keys to remove from self to not pass through to Mongo::Connection
%w(uri database username password logger)
Instance Method Summary collapse
-
#configure ⇒ Array<Mongo::DB, Array<Mongo:DB>>
Configure the database connections.
-
#initialize(options = {}) ⇒ Database
constructor
Create the new db configuration class.
Methods included from Extensions::Hash::Scoping
Methods included from Extensions::Hash::CriteriaHelpers
#expand_complex_criteria, #extract_id
Constructor Details
#initialize(options = {}) ⇒ Database
Create the new db configuration class.
44 45 46 |
# File 'lib/mongoid/config/database.rb', line 44 def initialize( = {}) merge!() end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (private)
Convenience for accessing the hash via dot notation.
134 135 136 |
# File 'lib/mongoid/config/database.rb', line 134 def method_missing(name, *args, &block) self[name.to_s] end |