Class: CircuitBreaker::Executors::BaseExecutor
- Inherits:
-
Object
- Object
- CircuitBreaker::Executors::BaseExecutor
- Includes:
- DSL
- Defined in:
- lib/circuit_breaker/executors/base_executor.rb
Direct Known Subclasses
AgentExecutor, AssistantExecutor, DockerExecutor, NatsExecutor, ServerlessExecutor, StepExecutor
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(context = {}) ⇒ BaseExecutor
constructor
A new instance of BaseExecutor.
Methods included from DSL
included, #validate_parameters
Constructor Details
#initialize(context = {}) ⇒ BaseExecutor
Returns a new instance of BaseExecutor.
10 11 12 13 14 |
# File 'lib/circuit_breaker/executors/base_executor.rb', line 10 def initialize(context = {}) @context = context @result = nil validate_parameters end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
8 9 10 |
# File 'lib/circuit_breaker/executors/base_executor.rb', line 8 def context @context end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
8 9 10 |
# File 'lib/circuit_breaker/executors/base_executor.rb', line 8 def result @result end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 21 |
# File 'lib/circuit_breaker/executors/base_executor.rb', line 16 def execute run_before_hooks execute_internal run_after_hooks @result end |