Rails BeatDB draft

This commit is contained in:
magnolia-fan
2011-04-07 00:59:50 +04:00
parent 4cdd06efca
commit 2f611742ba
6 changed files with 54 additions and 3 deletions
+13
View File
@@ -1,2 +1,15 @@
module ApplicationHelper
end
class Numeric
def toSeconds
(self / 1000).round
end
def toTime
s = self.toSeconds
m = (s / 60).floor
s -= m * 60
m.to_s << ':' << (s < 10 ? '0' : '') << s.to_s
end
end