Class: SimpleSpotify::Model::Track

Inherits:
Object
  • Object
show all
Includes:
Resource
Defined in:
lib/simplespotify/models/track.rb

Instance Method Summary collapse

Methods included from Resource

included

Instance Method Details

#durationObject



21
22
23
# File 'lib/simplespotify/models/track.rb', line 21

def duration
  Time.at(@duration_ms/1000).utc.strftime("%H:%M:%S")
end

#playable?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/simplespotify/models/track.rb', line 25

def playable?
  playable == true
end