Class: Fixnum

Inherits:
Object
  • Object
show all
Defined in:
lib/pickaxe/extensions.rb

Instance Method Summary collapse

Instance Method Details

#to_durationObject



29
30
31
32
33
34
35
# File 'lib/pickaxe/extensions.rb', line 29

def to_duration
	s = self
  m = s / 60
  s -= m * 60

  [m, s].compact.zip(["m", "s"]).collect(&:join).join(" ")
end