Class: Rack::WithSequel
- Inherits:
-
Object
- Object
- Rack::WithSequel
- Defined in:
- lib/rack/with_sequel.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ WithSequel
constructor
A new instance of WithSequel.
Constructor Details
#initialize(app, options = {}) ⇒ WithSequel
Returns a new instance of WithSequel.
3 4 5 6 |
# File 'lib/rack/with_sequel.rb', line 3 def initialize(app, ={}) @app = app @db = [:db] end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 |
# File 'lib/rack/with_sequel.rb', line 8 def call(env) db.synchronize do @app.call(env) end end |