Class: BreakerMachines::DSL::ParallelFallbackWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/breaker_machines/dsl.rb

Overview

Wrapper to indicate parallel execution for fallbacks

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fallbacksObject (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

Raises:

  • (NotImplementedError)


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