Class: Stilts::Rack

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

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Rack

Returns a new instance of Rack.



5
6
7
# File 'lib/stilts/rack.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
# File 'lib/stilts/rack.rb', line 9

def call(env)
  Stilts.sender.user_agent = env["HTTP_USER_AGENT"]
  @app.call(env)
end