Class: HTTPigeon::CircuitBreaker::NullResponse
- Inherits:
-
Faraday::Response
- Object
- Faraday::Response
- HTTPigeon::CircuitBreaker::NullResponse
- Defined in:
- lib/httpigeon/circuit_breaker/fuse_config.rb
Instance Attribute Summary collapse
-
#api_response ⇒ Object
readonly
Returns the value of attribute api_response.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Instance Method Summary collapse
-
#initialize(response = nil, exception = nil) ⇒ NullResponse
constructor
A new instance of NullResponse.
Constructor Details
#initialize(response = nil, exception = nil) ⇒ NullResponse
Returns a new instance of NullResponse.
8 9 10 11 12 |
# File 'lib/httpigeon/circuit_breaker/fuse_config.rb', line 8 def initialize(response = nil, exception = nil) @api_response = response @exception = exception super(status: 503, response_headers: response&.headers || {}) end |
Instance Attribute Details
#api_response ⇒ Object (readonly)
Returns the value of attribute api_response.
6 7 8 |
# File 'lib/httpigeon/circuit_breaker/fuse_config.rb', line 6 def api_response @api_response end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
6 7 8 |
# File 'lib/httpigeon/circuit_breaker/fuse_config.rb', line 6 def exception @exception end |