Exception: Fetch::HttpError
- Inherits:
-
StandardError
- Object
- StandardError
- Fetch::HttpError
- Defined in:
- lib/fetch.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(code, url) ⇒ HttpError
constructor
A new instance of HttpError.
- #message ⇒ Object
Constructor Details
#initialize(code, url) ⇒ HttpError
Returns a new instance of HttpError.
22 23 24 |
# File 'lib/fetch.rb', line 22 def initialize(code, url) @code, @url = code, url end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
20 21 22 |
# File 'lib/fetch.rb', line 20 def code @code end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
20 21 22 |
# File 'lib/fetch.rb', line 20 def url @url end |
Instance Method Details
#message ⇒ Object
26 27 28 |
# File 'lib/fetch.rb', line 26 def "HTTP Error #{code}: #{url}" end |