Class: Hooks::Plugins::Lifecycle
- Inherits:
-
Object
- Object
- Hooks::Plugins::Lifecycle
- Includes:
- Core::ComponentAccess
- Defined in:
- lib/hooks/plugins/lifecycle.rb
Overview
Base class for global lifecycle plugins
Plugins can hook into request/response/error lifecycle events
Instance Method Summary collapse
-
#on_error(exception, env) ⇒ Object
Called when any error occurs during request processing.
-
#on_request(env) ⇒ Object
Called before handler execution.
-
#on_response(env, response) ⇒ Object
Called after successful handler execution.
Methods included from Core::ComponentAccess
#failbot, #log, #method_missing, #respond_to_missing?, #stats
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Hooks::Core::ComponentAccess
Instance Method Details
#on_error(exception, env) ⇒ Object
Called when any error occurs during request processing
33 34 35 |
# File 'lib/hooks/plugins/lifecycle.rb', line 33 def on_error(exception, env) # Override in subclass for error handling logic end |
#on_request(env) ⇒ Object
Called before handler execution
17 18 19 |
# File 'lib/hooks/plugins/lifecycle.rb', line 17 def on_request(env) # Override in subclass for pre-processing logic end |
#on_response(env, response) ⇒ Object
Called after successful handler execution
25 26 27 |
# File 'lib/hooks/plugins/lifecycle.rb', line 25 def on_response(env, response) # Override in subclass for post-processing logic end |