Exception: Pin::SimpleError
- Inherits:
-
StandardError
- Object
- StandardError
- Pin::SimpleError
- Defined in:
- lib/pin_up/pin_errors.rb
Direct Known Subclasses
InsufficientPinBalance, InvalidResource, ResourceNotFound, Unauthorized, Unknown
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, message = nil) ⇒ SimpleError
constructor
A new instance of SimpleError.
- #to_s ⇒ Object
Constructor Details
#initialize(response, message = nil) ⇒ SimpleError
Returns a new instance of SimpleError.
67 68 69 70 |
# File 'lib/pin_up/pin_errors.rb', line 67 def initialize(response, =nil) @response = response @message = || @response['error_description'] end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
66 67 68 |
# File 'lib/pin_up/pin_errors.rb', line 66 def @message end |
#response ⇒ Object
Returns the value of attribute response.
66 67 68 |
# File 'lib/pin_up/pin_errors.rb', line 66 def response @response end |
Instance Method Details
#to_s ⇒ Object
72 73 74 |
# File 'lib/pin_up/pin_errors.rb', line 72 def to_s @message end |