Class: SimpleWorkflow::Middleware
- Inherits:
-
Object
- Object
- SimpleWorkflow::Middleware
- Includes:
- Detour
- Defined in:
- lib/simple_workflow/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Methods included from Detour
#pop_detour, #reset_workflow, #store_detour_in_session
Constructor Details
#initialize(app) ⇒ Middleware
6 7 8 9 |
# File 'lib/simple_workflow/middleware.rb', line 6 def initialize(app) @app = app @simple_workflow_encryptor = nil end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/simple_workflow/middleware.rb', line 11 def call(env) store_detour_from_params(env) status, headers, response = @app.call(env) remove_old_detours(env) [status, headers, response] end |