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