Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/runt.rb
Overview
Useful shortcuts!
Contributed by Ara T. Howard who is pretty sure he got the idea from somewhere else. :-)
Instance Method Summary collapse
- #days ⇒ Object
- #decades ⇒ Object
- #hours ⇒ Object
-
#microseconds ⇒ Object
:nodoc:.
- #milliseconds ⇒ Object
- #minutes ⇒ Object
- #months ⇒ Object
- #seconds ⇒ Object
- #weeks ⇒ Object
- #years ⇒ Object
Instance Method Details
permalink #decades ⇒ Object
[View source]
246 |
# File 'lib/runt.rb', line 246 def decades() 10 * years end |
permalink #hours ⇒ Object
[View source]
241 |
# File 'lib/runt.rb', line 241 def hours() 60 * minutes end |
permalink #microseconds ⇒ Object
:nodoc:
237 |
# File 'lib/runt.rb', line 237 def microseconds() Float(self * (10 ** -6)) end |
permalink #milliseconds ⇒ Object
[View source]
238 |
# File 'lib/runt.rb', line 238 def milliseconds() Float(self * (10 ** -3)) end |
permalink #minutes ⇒ Object
[View source]
240 |
# File 'lib/runt.rb', line 240 def minutes() 60 * seconds end |
permalink #months ⇒ Object
[View source]
244 |
# File 'lib/runt.rb', line 244 def months() 30 * days end |
permalink #years ⇒ Object
[View source]
245 |
# File 'lib/runt.rb', line 245 def years() 365 * days end |