Class: AppleMusic::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/apple_music/error.rb

Overview

Defined Under Namespace

Classes: Source

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(props = {}) ⇒ Error

Returns a new instance of Error.



8
9
10
11
12
13
14
15
# File 'lib/apple_music/error.rb', line 8

def initialize(props = {})
  @code = props['code'] # required
  @detail = props['detail']
  @id = props['id'] # required
  @source = Source.new(props['source']) if props['source']
  @status = props['status'] # required
  @title = props['title'] # required
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



6
7
8
# File 'lib/apple_music/error.rb', line 6

def code
  @code
end

#detailObject (readonly)

Returns the value of attribute detail.



6
7
8
# File 'lib/apple_music/error.rb', line 6

def detail
  @detail
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/apple_music/error.rb', line 6

def id
  @id
end

#sourceObject (readonly)

Returns the value of attribute source.



6
7
8
# File 'lib/apple_music/error.rb', line 6

def source
  @source
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/apple_music/error.rb', line 6

def status
  @status
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/apple_music/error.rb', line 6

def title
  @title
end