Module: Playa::Helpers

Included in:
PlaylistView, ProgressView
Defined in:
lib/playa/helpers/helpers.rb

Instance Method Summary collapse

Instance Method Details

#duration(track) ⇒ Object



3
4
5
# File 'lib/playa/helpers/helpers.rb', line 3

def duration(track)
  human(track.duration.ceil)
end

#remaining(track, player) ⇒ Object



7
8
9
# File 'lib/playa/helpers/helpers.rb', line 7

def remaining(track, player)
  human((track.duration - player.counter).floor)
end