Class: Rack::WithSequel

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/with_sequel.rb

Instance Method Summary collapse

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, options={})
  @app = app
  @db = options[: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