Class: Circuitbox::FaradayMiddleware::NullResponse
- Inherits:
-
Faraday::Response
- Object
- Faraday::Response
- Circuitbox::FaradayMiddleware::NullResponse
- Defined in:
- lib/circuitbox/faraday_middleware.rb
Instance Attribute Summary collapse
-
#original_exception ⇒ Object
readonly
Returns the value of attribute original_exception.
-
#original_response ⇒ Object
readonly
Returns the value of attribute original_response.
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.
13 14 15 16 17 |
# File 'lib/circuitbox/faraday_middleware.rb', line 13 def initialize(response = nil, exception = nil) @original_response = response @original_exception = exception super(status: 503, response_headers: {}) end |
Instance Attribute Details
#original_exception ⇒ Object (readonly)
Returns the value of attribute original_exception.
11 12 13 |
# File 'lib/circuitbox/faraday_middleware.rb', line 11 def original_exception @original_exception end |
#original_response ⇒ Object (readonly)
Returns the value of attribute original_response.
11 12 13 |
# File 'lib/circuitbox/faraday_middleware.rb', line 11 def original_response @original_response end |