Exception: Circuitbox::OpenCircuitError

Inherits:
Error
  • Object
show all
Defined in:
lib/circuitbox/errors/open_circuit_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service) ⇒ OpenCircuitError

Returns a new instance of OpenCircuitError.



7
8
9
10
# File 'lib/circuitbox/errors/open_circuit_error.rb', line 7

def initialize(service)
  super()
  @service = service
end

Instance Attribute Details

#serviceObject (readonly)

Returns the value of attribute service.



5
6
7
# File 'lib/circuitbox/errors/open_circuit_error.rb', line 5

def service
  @service
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/circuitbox/errors/open_circuit_error.rb', line 12

def to_s
  "#{self.class}: Service #{service.inspect} has an open circuit"
end