Class: Crashbreak::RestorersMiddleware
- Inherits:
-
Object
- Object
- Crashbreak::RestorersMiddleware
- Defined in:
- lib/crashbreak/restorers_middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RestorersMiddleware
constructor
A new instance of RestorersMiddleware.
Constructor Details
#initialize(app) ⇒ RestorersMiddleware
Returns a new instance of RestorersMiddleware.
3 4 5 |
# File 'lib/crashbreak/restorers_middleware.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/crashbreak/restorers_middleware.rb', line 7 def call(env) # It's ugly, we know that... env['rack.session'].merge! $session_data if $session_data @app.call(env) end |