Exception: HolidaysRest::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- HolidaysRest::ApiError
- Defined in:
- lib/holidays_rest/errors.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message, status_code, body) ⇒ ApiError
constructor
A new instance of ApiError.
- #inspect ⇒ Object
Constructor Details
#initialize(message, status_code, body) ⇒ ApiError
Returns a new instance of ApiError.
5 6 7 8 9 |
# File 'lib/holidays_rest/errors.rb', line 5 def initialize(, status_code, body) super() @status_code = status_code @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/holidays_rest/errors.rb', line 3 def body @body end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
3 4 5 |
# File 'lib/holidays_rest/errors.rb', line 3 def status_code @status_code end |
Instance Method Details
#inspect ⇒ Object
11 12 13 |
# File 'lib/holidays_rest/errors.rb', line 11 def inspect "#<HolidaysRest::ApiError status_code=#{@status_code} message=#{.inspect}>" end |