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.



485
486
487
# File 'lib/breaker_machines/dsl.rb', line 485

def initialize(fallbacks)
  @fallbacks = fallbacks
end

Instance Attribute Details

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

Raises:

  • (NotImplementedError)


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