Exception: WeatherSage::HTTP::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- WeatherSage::HTTP::Error
- Defined in:
- lib/weather-sage/http/error.rb
Overview
HTTP error wrapper.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, code, resp) ⇒ Error
constructor
Create Error instance from URL, response code, and response.
Constructor Details
#initialize(url, code, resp) ⇒ Error
Create Error instance from URL, response code, and response.
10 11 12 13 14 |
# File 'lib/weather-sage/http/error.rb', line 10 def initialize(url, code, resp) @url = url.freeze @code = code.freeze @response = resp.freeze end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/weather-sage/http/error.rb', line 5 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/weather-sage/http/error.rb', line 5 def response @response end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/weather-sage/http/error.rb', line 5 def url @url end |