Method: Mongo::Connection#db

Defined in:
lib/jmongo/connection.rb

#db(db_name, options = {}) ⇒ Mongo::DB

Return a database with the given name. See DB#new for valid options hash parameters.

Parameters:

  • db_name (String)

    a valid database name.

Returns:



160
161
162
# File 'lib/jmongo/connection.rb', line 160

def db(db_name, options={})
  DB.new db_name, self, options 
end