Exception: Ronan::HttpError
- Inherits:
-
StandardError
- Object
- StandardError
- Ronan::HttpError
- Defined in:
- lib/ronan/error.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #code ⇒ Object
- #context ⇒ Object
-
#initialize(response) ⇒ HttpError
constructor
A new instance of HttpError.
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ HttpError
Returns a new instance of HttpError.
9 10 11 12 |
# File 'lib/ronan/error.rb', line 9 def initialize(response) super(response.) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/ronan/error.rb', line 7 def response @response end |
Instance Method Details
#code ⇒ Object
22 23 24 |
# File 'lib/ronan/error.rb', line 22 def code response.code end |
#context ⇒ Object
18 19 20 |
# File 'lib/ronan/error.rb', line 18 def context "#{response.uri} responded with #{response.code}" end |
#message ⇒ Object
14 15 16 |
# File 'lib/ronan/error.rb', line 14 def "#{response.} (#{context})" end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/ronan/error.rb', line 26 def to_s end |