Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/timeloop/core_ext/numeric/time.rb

Instance Method Summary collapse

Instance Method Details

#daysObject Also known as: day



23
24
25
# File 'lib/timeloop/core_ext/numeric/time.rb', line 23

def days
  24 * self.hours
end

#hoursObject Also known as: hour



18
19
20
# File 'lib/timeloop/core_ext/numeric/time.rb', line 18

def hours
  60 * self.minutes 
end

#milisecondsObject Also known as: milisecond



3
4
5
# File 'lib/timeloop/core_ext/numeric/time.rb', line 3

def miliseconds
  self/1000.0
end

#minutesObject Also known as: minute



13
14
15
# File 'lib/timeloop/core_ext/numeric/time.rb', line 13

def minutes
  60 * self
end

#secondsObject Also known as: second



8
9
10
# File 'lib/timeloop/core_ext/numeric/time.rb', line 8

def seconds
  self
end

#weeksObject Also known as: week



28
29
30
# File 'lib/timeloop/core_ext/numeric/time.rb', line 28

def weeks
  7 * self.days
end