Class: Mongo::Configure::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo/configure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ Config

Returns a new instance of Config.


9
10
11
# File 'lib/mongo/configure.rb', line 9

def initialize(uri)
  @uri = uri
end

Instance Attribute Details

#uriObject (readonly)

Returns the value of attribute uri


13
14
15
# File 'lib/mongo/configure.rb', line 13

def uri
  @uri
end

Instance Method Details

#loadObject


15
16
17
# File 'lib/mongo/configure.rb', line 15

def load
  Mongo::Client.new(@uri.to_s).database
end