Class | Mongoid::Config::Database |
In: |
lib/mongoid/config/database.rb
|
Parent: | Hash |
This class handles the configuration and initialization of a mongodb database from options.
PRIVATE_OPTIONS | = | %w(uri database username password logger) | keys to remove from self to not pass through to Mongo::Connection |
Create the new db configuration class.
@example Initialize the class.
Config::Database.new( false, "uri" => { "mongodb://durran:password@localhost:27017/mongoid" } )
@param [ Hash ] options The configuration options.
@option options [ String ] :database The database name. @option options [ String ] :host The database host. @option options [ String ] :password The password for authentication. @option options [ Integer ] :port The port for the database. @option options [ String ] :uri The uri for the database. @option options [ String ] :username The user for authentication.
@since 2.0.0.rc.1