Class: Crashbreak::RestorersMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/crashbreak/restorers_middleware.rb

Instance Method Summary collapse

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