Class: RescueRegistry::ResetContext
- Inherits:
-
Object
- Object
- RescueRegistry::ResetContext
- Defined in:
- lib/rescue_registry/reset_context.rb
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(app) ⇒ ResetContext
constructor
A new instance of ResetContext.
Constructor Details
#initialize(app) ⇒ ResetContext
Returns a new instance of ResetContext.
3 4 5 |
# File 'lib/rescue_registry/reset_context.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(*args) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/rescue_registry/reset_context.rb', line 7 def call(*args) warn "Didn't expect RescueRegistry context to already be set in middleware" if RescueRegistry.context @app.call(*args) ensure RescueRegistry.context = nil end |