Class: Spotify::Models::Full::Album
- Defined in:
- lib/spotify/models/full/album.rb
Instance Attribute Summary collapse
-
#artists ⇒ Object
readonly
Returns the value of attribute artists.
-
#copyrights ⇒ Object
readonly
Returns the value of attribute copyrights.
-
#external_ids ⇒ Object
readonly
Returns the value of attribute external_ids.
-
#popularity ⇒ Object
readonly
Returns the value of attribute popularity.
-
#release_date ⇒ Object
readonly
Returns the value of attribute release_date.
-
#release_date_precision ⇒ Object
readonly
Returns the value of attribute release_date_precision.
-
#tracks ⇒ Object
readonly
Returns the value of attribute tracks.
Attributes inherited from Album
#album_type, #available_markets, #external_urls, #genres, #href, #id, #images, #name, #type, #uri
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Full::Album
constructor
Sets the arguments to its variables.
Constructor Details
#initialize(args = {}) ⇒ Full::Album
Sets the arguments to its variables.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/spotify/models/full/album.rb', line 17 def initialize(args = {}) super(args) args = Hash(args).with_indifferent_access # Arrays artists = Array(args[:artists]).map { |a| Artist.new(a) } copyrights = Array(args[:copyrights]).map { |c| Copyright.new(c) } # Objects external_ids = Spotify::Models::ExternalID.new(args[:external_ids]) # Paging items item = Spotify::Models::Simplified::Track tracks = Spotify::Models::Paging.new(args[:tracks], item) @artists = artists @copyrights = copyrights @external_ids = external_ids @popularity = args[:popularity] @release_date = args[:release_date] @release_date_precision = args[:release_date_precision] @tracks = tracks end |
Instance Attribute Details
#artists ⇒ Object (readonly)
Returns the value of attribute artists.
7 8 9 |
# File 'lib/spotify/models/full/album.rb', line 7 def artists @artists end |
#copyrights ⇒ Object (readonly)
Returns the value of attribute copyrights.
7 8 9 |
# File 'lib/spotify/models/full/album.rb', line 7 def copyrights @copyrights end |
#external_ids ⇒ Object (readonly)
Returns the value of attribute external_ids.
7 8 9 |
# File 'lib/spotify/models/full/album.rb', line 7 def external_ids @external_ids end |
#popularity ⇒ Object (readonly)
Returns the value of attribute popularity.
7 8 9 |
# File 'lib/spotify/models/full/album.rb', line 7 def popularity @popularity end |
#release_date ⇒ Object (readonly)
Returns the value of attribute release_date.
7 8 9 |
# File 'lib/spotify/models/full/album.rb', line 7 def release_date @release_date end |
#release_date_precision ⇒ Object (readonly)
Returns the value of attribute release_date_precision.
7 8 9 |
# File 'lib/spotify/models/full/album.rb', line 7 def release_date_precision @release_date_precision end |
#tracks ⇒ Object (readonly)
Returns the value of attribute tracks.
7 8 9 |
# File 'lib/spotify/models/full/album.rb', line 7 def tracks @tracks end |