Exception: LessonlyApi::Errors::ApiError

Inherits:
Base
  • Object
show all
Defined in:
lib/lessonly_api/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (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

#messageObject



13
14
15
# File 'lib/lessonly_api/errors.rb', line 13

def message
  "#{self.class.name}: #{body}"
end