Class: Zold::Http::Error
- Inherits:
-
Object
- Object
- Zold::Http::Error
- Defined in:
- lib/zold/http.rb
Overview
The error, if connection fails
Instance Method Summary collapse
- #body ⇒ Object
- #code ⇒ Object
- #header ⇒ Object
-
#initialize(ex) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(ex) ⇒ Error
Returns a new instance of Error.
111 112 113 |
# File 'lib/zold/http.rb', line 111 def initialize(ex) @ex = ex end |
Instance Method Details
#code ⇒ Object
123 124 125 |
# File 'lib/zold/http.rb', line 123 def code '599' end |
#header ⇒ Object
131 132 133 |
# File 'lib/zold/http.rb', line 131 def header {} end |
#message ⇒ Object
127 128 129 |
# File 'lib/zold/http.rb', line 127 def @ex. end |
#to_s ⇒ Object
115 116 117 |
# File 'lib/zold/http.rb', line 115 def to_s "#{code}: #{}\n#{body}" end |