Class: RackRailsCookieHeaderHack
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RackRailsCookieHeaderHack
constructor
A new instance of RackRailsCookieHeaderHack.
Constructor Details
#initialize(app) ⇒ RackRailsCookieHeaderHack
Returns a new instance of RackRailsCookieHeaderHack.
3 4 5 |
# File 'lib/stratagem/rack_hack.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 |
# File 'lib/stratagem/rack_hack.rb', line 7 def call(env) status, headers, body = @app.call(env) headers['Set-Cookie'] = headers['Set-Cookie'].first [status, headers, body] end |