Class: AppleMusic::Error
- Inherits:
-
Object
- Object
- AppleMusic::Error
- Defined in:
- lib/apple_music/error.rb
Overview
Defined Under Namespace
Classes: Source
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(props = {}) ⇒ Error
constructor
A new instance of Error.
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
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/apple_music/error.rb', line 6 def code @code end |
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
6 7 8 |
# File 'lib/apple_music/error.rb', line 6 def detail @detail end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/apple_music/error.rb', line 6 def id @id end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
6 7 8 |
# File 'lib/apple_music/error.rb', line 6 def source @source end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/apple_music/error.rb', line 6 def status @status end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/apple_music/error.rb', line 6 def title @title end |