Class: Spotify::Models::PlaylistTrack
- Inherits:
-
Object
- Object
- Spotify::Models::PlaylistTrack
- Defined in:
- lib/spotify/models/playlist_track.rb
Instance Attribute Summary collapse
-
#added_at ⇒ Object
readonly
Returns the value of attribute added_at.
-
#added_by ⇒ Object
readonly
Returns the value of attribute added_by.
-
#is_local ⇒ Object
readonly
Returns the value of attribute is_local.
-
#track ⇒ Object
readonly
Returns the value of attribute track.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ PlaylistTrack
constructor
A new instance of PlaylistTrack.
Constructor Details
#initialize(args = {}) ⇒ PlaylistTrack
Returns a new instance of PlaylistTrack.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/spotify/models/playlist_track.rb', line 9 def initialize(args = {}) args = args.with_indifferent_access @is_local = args[:is_local] @track = Track.new(args[:name]) # HACK: Using JSON while the other classes aren't available. @added_at = args[:added_at] @added_by = args[:added_by] end |
Instance Attribute Details
#added_at ⇒ Object (readonly)
Returns the value of attribute added_at.
7 8 9 |
# File 'lib/spotify/models/playlist_track.rb', line 7 def added_at @added_at end |
#added_by ⇒ Object (readonly)
Returns the value of attribute added_by.
7 8 9 |
# File 'lib/spotify/models/playlist_track.rb', line 7 def added_by @added_by end |
#is_local ⇒ Object (readonly)
Returns the value of attribute is_local.
7 8 9 |
# File 'lib/spotify/models/playlist_track.rb', line 7 def is_local @is_local end |
#track ⇒ Object (readonly)
Returns the value of attribute track.
7 8 9 |
# File 'lib/spotify/models/playlist_track.rb', line 7 def track @track end |