Class: Spotify::Models::PlaylistTrack

Inherits:
Object
  • Object
show all
Defined in:
lib/spotify/models/playlist_track.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atObject (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_byObject (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_localObject (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

#trackObject (readonly)

Returns the value of attribute track.



7
8
9
# File 'lib/spotify/models/playlist_track.rb', line 7

def track
  @track
end