Exception: SimpleSpotify::Error::DefaultError
- Inherits:
-
StandardError
- Object
- StandardError
- SimpleSpotify::Error::DefaultError
- Defined in:
- lib/simplespotify/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(code, body, request) ⇒ DefaultError
constructor
A new instance of DefaultError.
Constructor Details
#initialize(code, body, request) ⇒ DefaultError
Returns a new instance of DefaultError.
26 27 28 29 30 31 |
# File 'lib/simplespotify/errors.rb', line 26 def initialize code, body, request @code = code @body = body @request = request @message = body[:error][:message] unless body.nil? end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
25 26 27 |
# File 'lib/simplespotify/errors.rb', line 25 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
25 26 27 |
# File 'lib/simplespotify/errors.rb', line 25 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
25 26 27 |
# File 'lib/simplespotify/errors.rb', line 25 def @message end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
25 26 27 |
# File 'lib/simplespotify/errors.rb', line 25 def request @request end |