Exception: Singly::ApiError
- Defined in:
- lib/singly/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, msg = nil) ⇒ ApiError
constructor
A new instance of ApiError.
Methods inherited from Error
Constructor Details
#initialize(response, msg = nil) ⇒ ApiError
Returns a new instance of ApiError.
16 17 18 19 |
# File 'lib/singly/error.rb', line 16 def initialize(response, msg=nil) @response = response super(msg || "HTTP #{response.code} #{response.body}") end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
15 16 17 |
# File 'lib/singly/error.rb', line 15 def response @response end |