Module: Rack::GridFS::Endpoint::Connection
- Included in:
- Rack::GridFS::Endpoint
- Defined in:
- lib/rack/gridfs/endpoint/connection.rb
Instance Method Summary collapse
Instance Method Details
#db ⇒ Object
22 23 24 |
# File 'lib/rack/gridfs/endpoint/connection.rb', line 22 def db @db ||= (super || connect!) end |
#default_options ⇒ Object
15 16 17 18 19 20 |
# File 'lib/rack/gridfs/endpoint/connection.rb', line 15 def super.merge({ :hostname => 'localhost', :port => Mongo::Connection::DEFAULT_PORT }) end |
#initialize ⇒ Object
8 9 10 11 12 13 |
# File 'lib/rack/gridfs/endpoint/connection.rb', line 8 def initialize(*) super @hostname, @port, @database, @username, @password = .values_at(:hostname, :port, :database, :username, :password) end |