Module: Sinatra::Mongomatic
- Defined in:
- lib/sinatra/mongomatic.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.registered(app) ⇒ Object
6 7 8 |
# File 'lib/sinatra/mongomatic.rb', line 6 def self.registered(app) app.mongomatic end |
Instance Method Details
#mongomatic(connection = nil) ⇒ Object
10 11 12 |
# File 'lib/sinatra/mongomatic.rb', line 10 def mongomatic(connection = nil) ::Mongomatic.db = connection || Mongo::Connection.new.db("test") end |