Class: KodiClient::KodiError
- Inherits:
-
Object
- Object
- KodiClient::KodiError
- Includes:
- Extensions::Comparable
- Defined in:
- lib/kodi_client/kodi_error.rb
Overview
represents an error response
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(hash) ⇒ KodiError
constructor
A new instance of KodiError.
Methods included from Extensions::Comparable
Constructor Details
#initialize(hash) ⇒ KodiError
Returns a new instance of KodiError.
9 10 11 12 |
# File 'lib/kodi_client/kodi_error.rb', line 9 def initialize(hash) @code = hash['code'] @message = hash['message'] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/kodi_client/kodi_error.rb', line 7 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/kodi_client/kodi_error.rb', line 7 def @message end |