Class: HTTPX::ErrorResponse
- Inherits:
-
Object
- Object
- HTTPX::ErrorResponse
- Defined in:
- lib/httpx/response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
(also: #status)
readonly
Returns the value of attribute error.
-
#retries ⇒ Object
readonly
Returns the value of attribute retries.
Instance Method Summary collapse
-
#initialize(error, retries) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
- #retryable? ⇒ Boolean
Constructor Details
#initialize(error, retries) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
216 217 218 219 |
# File 'lib/httpx/response.rb', line 216 def initialize(error, retries) @error = error @retries = retries end |
Instance Attribute Details
#error ⇒ Object (readonly) Also known as: status
Returns the value of attribute error.
212 213 214 |
# File 'lib/httpx/response.rb', line 212 def error @error end |
#retries ⇒ Object (readonly)
Returns the value of attribute retries.
212 213 214 |
# File 'lib/httpx/response.rb', line 212 def retries @retries end |
Instance Method Details
#retryable? ⇒ Boolean
221 222 223 |
# File 'lib/httpx/response.rb', line 221 def retryable? @retries.positive? end |