Class: KcrwApi::Track
- Inherits:
-
Object
- Object
- KcrwApi::Track
- Defined in:
- lib/kcrw_api/track.rb
Instance Attribute Summary collapse
-
#album ⇒ Object
readonly
Returns the value of attribute album.
-
#album_image ⇒ Object
readonly
Returns the value of attribute album_image.
-
#album_image_large ⇒ Object
readonly
Returns the value of attribute album_image_large.
-
#artist ⇒ Object
readonly
Returns the value of attribute artist.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#title ⇒ Object
readonly
attr_reader :spotify_uri.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(track_hash) ⇒ Track
constructor
A new instance of Track.
Constructor Details
#initialize(track_hash) ⇒ Track
Returns a new instance of Track.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/kcrw_api/track.rb', line 12 def initialize(track_hash) @album_image = track_hash['albumImage'] @album_image_large = track_hash['albumImageLarge'] @album = track_hash['album'] @artist = track_hash['artist'] @label = track_hash['label'] @title = track_hash['title'] @year = track_hash['year'] # @spotify_uri = spotify_uri end |
Instance Attribute Details
#album ⇒ Object (readonly)
Returns the value of attribute album.
5 6 7 |
# File 'lib/kcrw_api/track.rb', line 5 def album @album end |
#album_image ⇒ Object (readonly)
Returns the value of attribute album_image.
3 4 5 |
# File 'lib/kcrw_api/track.rb', line 3 def album_image @album_image end |
#album_image_large ⇒ Object (readonly)
Returns the value of attribute album_image_large.
4 5 6 |
# File 'lib/kcrw_api/track.rb', line 4 def album_image_large @album_image_large end |
#artist ⇒ Object (readonly)
Returns the value of attribute artist.
6 7 8 |
# File 'lib/kcrw_api/track.rb', line 6 def artist @artist end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
7 8 9 |
# File 'lib/kcrw_api/track.rb', line 7 def label @label end |
#title ⇒ Object (readonly)
attr_reader :spotify_uri
9 10 11 |
# File 'lib/kcrw_api/track.rb', line 9 def title @title end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
10 11 12 |
# File 'lib/kcrw_api/track.rb', line 10 def year @year end |