Exception: Tinylinks::Client::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Tinylinks::Client::ApiError
- Defined in:
- lib/tinylinks/client.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, body) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(status, body) ⇒ ApiError
Returns a new instance of ApiError.
12 13 14 15 16 |
# File 'lib/tinylinks/client.rb', line 12 def initialize(status, body) @status = status @body = body super("API error #{status}: #{body}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
10 11 12 |
# File 'lib/tinylinks/client.rb', line 10 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
10 11 12 |
# File 'lib/tinylinks/client.rb', line 10 def status @status end |