Class: Shamu::Rack::CookiesMiddleware
- Inherits:
-
Object
- Object
- Shamu::Rack::CookiesMiddleware
- Includes:
- Scorpion::Rack
- Defined in:
- lib/shamu/rack/cookies_middleware.rb
Overview
Expose a Cookies hash to any service that wants to use session specific storage.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ CookiesMiddleware
constructor
A new instance of CookiesMiddleware.
Constructor Details
#initialize(app) ⇒ CookiesMiddleware
Returns a new instance of CookiesMiddleware.
11 12 13 |
# File 'lib/shamu/rack/cookies_middleware.rb', line 11 def initialize( app ) @app = app end |
Instance Method Details
#call(env) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/shamu/rack/cookies_middleware.rb', line 15 def call( env ) = Shamu::Rack::Cookies.new( env ) scorpion( env ).hunt_for Shamu::Rack::Cookies, return: status, headers, body = @app.call( env ) [ status, .apply!( headers ), body ] end |