Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/timeloop/core_ext/numeric/time.rb
Instance Method Summary collapse
- #days ⇒ Object (also: #day)
- #hours ⇒ Object (also: #hour)
- #miliseconds ⇒ Object (also: #milisecond)
- #minutes ⇒ Object (also: #minute)
- #seconds ⇒ Object (also: #second)
- #weeks ⇒ Object (also: #week)
Instance Method Details
#days ⇒ Object Also known as: day
23 24 25 |
# File 'lib/timeloop/core_ext/numeric/time.rb', line 23 def days 24 * self.hours end |
#hours ⇒ Object Also known as: hour
18 19 20 |
# File 'lib/timeloop/core_ext/numeric/time.rb', line 18 def hours 60 * self.minutes end |
#miliseconds ⇒ Object Also known as: milisecond
3 4 5 |
# File 'lib/timeloop/core_ext/numeric/time.rb', line 3 def miliseconds self/1000.0 end |
#minutes ⇒ Object Also known as: minute
13 14 15 |
# File 'lib/timeloop/core_ext/numeric/time.rb', line 13 def minutes 60 * self end |
#seconds ⇒ Object Also known as: second
8 9 10 |
# File 'lib/timeloop/core_ext/numeric/time.rb', line 8 def seconds self end |
#weeks ⇒ Object Also known as: week
28 29 30 |
# File 'lib/timeloop/core_ext/numeric/time.rb', line 28 def weeks 7 * self.days end |