Exception: Checkdin::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- Checkdin::APIError
- Defined in:
- lib/checkdin/api_error.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.
- #message ⇒ Object
Constructor Details
#initialize(status, body) ⇒ APIError
Returns a new instance of APIError.
6 7 8 9 |
# File 'lib/checkdin/api_error.rb', line 6 def initialize(status, body) @status = status @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/checkdin/api_error.rb', line 4 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/checkdin/api_error.rb', line 4 def status @status end |
Instance Method Details
#message ⇒ Object
11 12 13 |
# File 'lib/checkdin/api_error.rb', line 11 def "Status Code: #{status}\nBody: #{body}" end |