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.
482 483 484 |
# File 'lib/breaker_machines/dsl.rb', line 482 def initialize(fallbacks) @fallbacks = fallbacks end |
Instance Attribute Details
#fallbacks ⇒ Object (readonly)
Returns the value of attribute fallbacks.
480 481 482 |
# File 'lib/breaker_machines/dsl.rb', line 480 def fallbacks @fallbacks end |
Instance Method Details
#call(error) ⇒ Object
486 487 488 489 490 |
# File 'lib/breaker_machines/dsl.rb', line 486 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 |