Class: KodiClient::KodiError

Inherits:
Object
  • Object
show all
Includes:
Extensions::Comparable
Defined in:
lib/kodi_client/kodi_error.rb

Overview

represents an error response

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Extensions::Comparable

#==, #compare

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

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'lib/kodi_client/kodi_error.rb', line 7

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



7
8
9
# File 'lib/kodi_client/kodi_error.rb', line 7

def message
  @message
end