Class: Zold::HttpError
- Inherits:
-
HttpResponse
- Object
- SimpleDelegator
- HttpResponse
- Zold::HttpError
- Defined in:
- lib/zold/http.rb
Overview
The error, if connection fails
Instance Method Summary collapse
- #body ⇒ Object
- #headers ⇒ Object
-
#initialize(ex) ⇒ HttpError
constructor
A new instance of HttpError.
- #status ⇒ Object
- #status_line ⇒ Object
Methods inherited from HttpResponse
Constructor Details
#initialize(ex) ⇒ HttpError
Returns a new instance of HttpError.
52 53 54 |
# File 'lib/zold/http.rb', line 52 def initialize(ex) @ex = ex end |
Instance Method Details
#body ⇒ Object
56 57 58 |
# File 'lib/zold/http.rb', line 56 def body Backtrace.new(@ex).to_s end |
#headers ⇒ Object
68 69 70 |
# File 'lib/zold/http.rb', line 68 def headers {} end |
#status ⇒ Object
60 61 62 |
# File 'lib/zold/http.rb', line 60 def status 599 end |
#status_line ⇒ Object
64 65 66 |
# File 'lib/zold/http.rb', line 64 def status_line @ex. || '' end |