Class: Spotify::Album
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Spotify::Album
- Defined in:
- lib/spotify.rb
Overview
Internal: Represents an album.
Direct Known Subclasses
Instance Method Summary (collapse)
-
- (Object) artist
Public: Gets the artist of artists.
-
- (Object) artists
Public: Gets the artists.
Instance Method Details
- (Object) artist
Public: Gets the artist of artists.
Returns an Array of Spotify::Artist objects or a Spotify::Artist object if only one artist was returned.
124 125 126 127 128 129 130 131 132 |
# File 'lib/spotify.rb', line 124 def artist if artists.nil? Artist.new :name => super elsif artists.size > 1 artists else artists.first end end |
- (Object) artists
Public: Gets the artists.
Returns an Array of Spotify::Artist objects.
116 117 118 |
# File 'lib/spotify.rb', line 116 def artists super.nil? ? super : super.map { |artist| Artist.new artist } end |