Exception: Grendel::Client::HTTPException
- Inherits:
-
Exception
- Object
- Exception
- Grendel::Client::HTTPException
- Defined in:
- lib/grendel/client.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ HTTPException
constructor
A new instance of HTTPException.
Constructor Details
#initialize(response) ⇒ HTTPException
Returns a new instance of HTTPException.
63 64 65 66 67 68 |
# File 'lib/grendel/client.rb', line 63 def initialize(response) @response = response msg = "#{response.code} #{response.}" msg << "\n#{response.body}" unless response.body.blank? super(msg) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
61 62 63 |
# File 'lib/grendel/client.rb', line 61 def response @response end |