Sha256: 8199c28311ae553813e4d861a5d558ab675442c1c40bf914260116a0db6c8eef
Contents?: true
Size: 474 Bytes
Versions: 6
Compression:
Stored size: 474 Bytes
Contents
module Lono::Utils module Pretty def pretty_path(path) path.sub("#{Lono.root}/",'') end # http://stackoverflow.com/questions/4175733/convert-duration-to-hoursminutesseconds-or-similar-in-rails-3-or-ruby def pretty_time(total_seconds) minutes = (total_seconds / 60) % 60 seconds = total_seconds % 60 if total_seconds < 60 "#{seconds.to_i}s" else "#{minutes.to_i}m #{seconds.to_i}s" end end end end
Version data entries
6 entries across 6 versions & 1 rubygems