Class: Spotify::Models::Full::Track
- Defined in:
- lib/spotify/models/full/track.rb
Instance Attribute Summary collapse
-
#album ⇒ Object
readonly
Returns the value of attribute album.
-
#external_ids ⇒ Object
readonly
Returns the value of attribute external_ids.
-
#popularity ⇒ Object
readonly
Returns the value of attribute popularity.
Attributes inherited from Track
#artists, #available_markets, #disc_number, #duration_ms, #explicit, #external_urls, #href, #id, #is_playable, #linked_from, #name, #preview_url, #track_number, #type, #uri
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Full::Track
constructor
Sets the arguments to its variables.
Constructor Details
#initialize(args = {}) ⇒ Full::Track
Sets the arguments to its variables.
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/spotify/models/full/track.rb', line 16 def initialize(args = {}) super(args) args = Hash(args).with_indifferent_access # Objects album = Spotify::Models::Simplified::Album.new(args[:album]) external_ids = Spotify::Models::ExternalID.new(args[:external_ids]) @album = album @external_ids = external_ids @popularity = args[:popularity] end |
Instance Attribute Details
#album ⇒ Object (readonly)
Returns the value of attribute album.
7 8 9 |
# File 'lib/spotify/models/full/track.rb', line 7 def album @album end |
#external_ids ⇒ Object (readonly)
Returns the value of attribute external_ids.
7 8 9 |
# File 'lib/spotify/models/full/track.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/track.rb', line 7 def popularity @popularity end |