Class: Circuitbox::FaradayMiddleware::NullResponse

Inherits:
Faraday::Response
  • Object
show all
Defined in:
lib/circuitbox/faraday_middleware.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_exceptionObject (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_responseObject (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