Exception: LessonlyApi::Errors::ApiError
- Defined in:
- lib/lessonly_api/errors.rb
Direct Known Subclasses
BadRequest, Forbidden, InternalServerError, MethodNotAllowed, NotAcceptable, NotFound, ServiceUnavailable, Unauthorized
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(body) ⇒ ApiError
constructor
A new instance of ApiError.
- #message ⇒ Object
Constructor Details
#initialize(body) ⇒ ApiError
Returns a new instance of ApiError.
9 10 11 |
# File 'lib/lessonly_api/errors.rb', line 9 def initialize(body) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
7 8 9 |
# File 'lib/lessonly_api/errors.rb', line 7 def body @body end |
Instance Method Details
#message ⇒ Object
13 14 15 |
# File 'lib/lessonly_api/errors.rb', line 13 def "#{self.class.name}: #{body}" end |