Class: AppleMusic::Curator::Attributes

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

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(props = {}) ⇒ Attributes

Returns a new instance of Attributes.



9
10
11
12
13
14
# File 'lib/apple_music/curator/attributes.rb', line 9

def initialize(props = {})
  @artwork = Artwork.new(props['artwork']) # required
  @editorial_notes = EditorialNotes.new(props['editorialNotes']) if props['editorialNotes']
  @name = props['name'] # required
  @url = props['url'] # required
end

Instance Attribute Details

#artworkObject (readonly)

Returns the value of attribute artwork.



7
8
9
# File 'lib/apple_music/curator/attributes.rb', line 7

def artwork
  @artwork
end

#editorial_notesObject (readonly)

Returns the value of attribute editorial_notes.



7
8
9
# File 'lib/apple_music/curator/attributes.rb', line 7

def editorial_notes
  @editorial_notes
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/apple_music/curator/attributes.rb', line 7

def name
  @name
end

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'lib/apple_music/curator/attributes.rb', line 7

def url
  @url
end