Exception: PriceHubble::RequestError
- Inherits:
-
StandardError
- Object
- StandardError
- PriceHubble::RequestError
- Defined in:
- lib/price_hubble/errors.rb
Overview
Generic request/response exception class.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(message = nil, response = nil) ⇒ RequestError
constructor
Create a new instance of the error.
Constructor Details
#initialize(message = nil, response = nil) ⇒ RequestError
Create a new instance of the error.
16 17 18 19 20 21 |
# File 'lib/price_hubble/errors.rb', line 16 def initialize( = nil, response = nil) @response = response ||= response.body. if response.body.respond_to? :message super() end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
10 11 12 |
# File 'lib/price_hubble/errors.rb', line 10 def response @response end |