Class: BreakerMachines::DSL::ParallelFallbackWrapper
- Inherits:
-
Object
- Object
- BreakerMachines::DSL::ParallelFallbackWrapper
- Defined in:
- lib/breaker_machines/dsl.rb
Overview
Wrapper to indicate parallel execution for fallbacks
Instance Attribute Summary collapse
-
#fallbacks ⇒ Object
readonly
Returns the value of attribute fallbacks.
Instance Method Summary collapse
- #call(error) ⇒ Object
-
#initialize(fallbacks) ⇒ ParallelFallbackWrapper
constructor
A new instance of ParallelFallbackWrapper.
Constructor Details
#initialize(fallbacks) ⇒ ParallelFallbackWrapper
Returns a new instance of ParallelFallbackWrapper.
485 486 487 |
# File 'lib/breaker_machines/dsl.rb', line 485 def initialize(fallbacks) @fallbacks = fallbacks end |
Instance Attribute Details
#fallbacks ⇒ Object (readonly)
Returns the value of attribute fallbacks.
483 484 485 |
# File 'lib/breaker_machines/dsl.rb', line 483 def fallbacks @fallbacks end |
Instance Method Details
#call(error) ⇒ Object
489 490 491 492 493 |
# File 'lib/breaker_machines/dsl.rb', line 489 def call(error) # This will be handled by the circuit's fallback mechanism # to execute fallbacks in parallel raise NotImplementedError, 'ParallelFallbackWrapper should be handled by Circuit' end |