Module: Time::Units
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Method Summary collapse
- #__less__ ⇒ Object
- #__more__ ⇒ Object
- #centuries ⇒ Object
- #days ⇒ Object
- #decades ⇒ Object
- #hours ⇒ Object
- #microseconds ⇒ Object
- #milliseconds ⇒ Object
- #minutes ⇒ Object
- #months ⇒ Object
- #seconds ⇒ Object
- #weeks ⇒ Object
-
#years ⇒ Object
def years() months.send(__more__,12) end.
Instance Method Details
#__less__ ⇒ Object
8 |
# File 'lib/timeunits.rb', line 8 def __less__() "/" end |
#__more__ ⇒ Object
9 |
# File 'lib/timeunits.rb', line 9 def __more__() "*" end |
#centuries ⇒ Object
21 |
# File 'lib/timeunits.rb', line 21 def centuries() decades.send(__more__,10) end |
#days ⇒ Object
15 |
# File 'lib/timeunits.rb', line 15 def days() hours.send(__more__,24) end |
#decades ⇒ Object
20 |
# File 'lib/timeunits.rb', line 20 def decades() years.send(__more__,10) end |
#hours ⇒ Object
14 |
# File 'lib/timeunits.rb', line 14 def hours() minutes.send(__more__,60) end |
#microseconds ⇒ Object
10 |
# File 'lib/timeunits.rb', line 10 def microseconds() Float(self.send(__more__,(10 ** -6))) end |
#milliseconds ⇒ Object
11 |
# File 'lib/timeunits.rb', line 11 def milliseconds() Float(self.send(__more__,(10 ** -3))) end |
#minutes ⇒ Object
13 |
# File 'lib/timeunits.rb', line 13 def minutes() seconds.send(__more__,60) end |
#months ⇒ Object
17 |
# File 'lib/timeunits.rb', line 17 def months() weeks.send(__more__,4) end |
#seconds ⇒ Object
12 |
# File 'lib/timeunits.rb', line 12 def seconds() self end |
#weeks ⇒ Object
16 |
# File 'lib/timeunits.rb', line 16 def weeks() days.send(__more__,7) end |
#years ⇒ Object
def years() months.send(__more__,12) end
19 |
# File 'lib/timeunits.rb', line 19 def years() days.send(__more__,365) end |