Class: AppleMusic::Song::Relationships
- Inherits:
-
Object
- Object
- AppleMusic::Song::Relationships
- Defined in:
- lib/apple_music/song/relationships.rb
Overview
Instance Attribute Summary collapse
-
#albums ⇒ Object
readonly
Returns the value of attribute albums.
-
#artists ⇒ Object
readonly
Returns the value of attribute artists.
-
#genres ⇒ Object
readonly
Returns the value of attribute genres.
-
#station ⇒ Object
readonly
Returns the value of attribute station.
Instance Method Summary collapse
-
#initialize(props = {}) ⇒ Relationships
constructor
A new instance of Relationships.
Constructor Details
#initialize(props = {}) ⇒ Relationships
Returns a new instance of Relationships.
9 10 11 12 13 14 |
# File 'lib/apple_music/song/relationships.rb', line 9 def initialize(props = {}) @albums = Relationship.new(props['albums']).data @artists = Relationship.new(props['artists']).data @genres = Relationship.new(props['genres']).data @station = Relationship.new(props['station']).data.first end |
Instance Attribute Details
#albums ⇒ Object (readonly)
Returns the value of attribute albums.
7 8 9 |
# File 'lib/apple_music/song/relationships.rb', line 7 def albums @albums end |
#artists ⇒ Object (readonly)
Returns the value of attribute artists.
7 8 9 |
# File 'lib/apple_music/song/relationships.rb', line 7 def artists @artists end |
#genres ⇒ Object (readonly)
Returns the value of attribute genres.
7 8 9 |
# File 'lib/apple_music/song/relationships.rb', line 7 def genres @genres end |
#station ⇒ Object (readonly)
Returns the value of attribute station.
7 8 9 |
# File 'lib/apple_music/song/relationships.rb', line 7 def station @station end |