Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/god/sugar.rb
Instance Method Summary collapse
- #days ⇒ Object (also: #day)
- #gigabytes ⇒ Object (also: #gigabyte)
- #hours ⇒ Object (also: #hour)
- #kilobytes ⇒ Object (also: #kilobyte)
- #megabytes ⇒ Object (also: #megabyte)
- #minutes ⇒ Object (also: #minute)
- #percent ⇒ Object
- #seconds ⇒ Object (also: #second)
Instance Method Details
#days ⇒ Object Also known as: day
20 21 22 |
# File 'lib/god/sugar.rb', line 20 def days self * 86400 end |
#gigabytes ⇒ Object Also known as: gigabyte
38 39 40 |
# File 'lib/god/sugar.rb', line 38 def gigabytes self * (1024 ** 2) end |
#hours ⇒ Object Also known as: hour
14 15 16 |
# File 'lib/god/sugar.rb', line 14 def hours self * 3600 end |
#kilobytes ⇒ Object Also known as: kilobyte
26 27 28 |
# File 'lib/god/sugar.rb', line 26 def kilobytes self end |
#megabytes ⇒ Object Also known as: megabyte
32 33 34 |
# File 'lib/god/sugar.rb', line 32 def megabytes self * 1024 end |
#minutes ⇒ Object Also known as: minute
8 9 10 |
# File 'lib/god/sugar.rb', line 8 def minutes self * 60 end |
#percent ⇒ Object
44 45 46 |
# File 'lib/god/sugar.rb', line 44 def percent self end |
#seconds ⇒ Object Also known as: second
2 3 4 |
# File 'lib/god/sugar.rb', line 2 def seconds self end |