Exception: Gom::HttpError
- Inherits:
-
StandardError
- Object
- StandardError
- Gom::HttpError
- Defined in:
- lib/gom/client.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(http_response, description) ⇒ HttpError
constructor
A new instance of HttpError.
- #to_s ⇒ Object
Constructor Details
#initialize(http_response, description) ⇒ HttpError
Returns a new instance of HttpError.
13 14 15 16 |
# File 'lib/gom/client.rb', line 13 def initialize(http_response, description) @response = http_response @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
11 12 13 |
# File 'lib/gom/client.rb', line 11 def description @description end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
11 12 13 |
# File 'lib/gom/client.rb', line 11 def response @response end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/gom/client.rb', line 18 def to_s "#{@response.code} #{@response.message} #{@description}" end |