Class: DiviningRod::Rack

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

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Rack

Returns a new instance of Rack.



4
5
6
# File 'lib/divining_rod/rack/divining_rack.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
# File 'lib/divining_rod/rack/divining_rack.rb', line 8

def call(env)
  request = ::Rack::Request.new(env)
  profile = DiviningRod::Profile.new(request)
  env['divining_rod.profile'] = profile
  @app.call(env)
end