Module: Sinatra::Monk
- Defined in:
- lib/sinatra-monk/2.0.rb,
lib/sinatra-monk/monk.rb,
lib/sinatra-monk/helpers.rb
Defined Under Namespace
Instance Method Summary collapse
-
#hmonk(name = 'monk', user = '', pass = '', database = 'local', host = 'localhost', port = 27017, opts = {:save => true}) ⇒ MHash
(Any Ruby) A helper that create a MHash instance.
-
#monk(user = '', pass = '', database = 'local', host = 'localhost', port = 27017, opts = {:connect => false}) ⇒ MBase
(Any Ruby) A helper that create a MBase instance.
Instance Method Details
#hmonk(name = 'monk', user = '', pass = '', database = 'local', host = 'localhost', port = 27017, opts = {:save => true}) ⇒ MHash
(Any Ruby) A helper that create a MHash instance.
94 95 96 97 |
# File 'lib/sinatra-monk/2.0.rb', line 94 def hmonk(name:'monk', user:'', pass:'', database:'local', host:'localhost', port:27017, opts:{:connect => false}) return MHash.new(name, user, pass, database, host, port, opts) end |
#monk(user = '', pass = '', database = 'local', host = 'localhost', port = 27017, opts = {:connect => false}) ⇒ MBase
(Any Ruby) A helper that create a MBase instance.
80 81 82 83 |
# File 'lib/sinatra-monk/2.0.rb', line 80 def monk(user:'', pass:'', database:'local', host:'localhost', port:27017, opts:{:connect => false}) return MBase.new(user, pass, database, host, port, opts) end |