Class: Fixnum
- Inherits:
-
Object
- Object
- Fixnum
- Defined in:
- lib/marjoree/time.rb
Instance Method Summary collapse
- #ago ⇒ Object
- #days ⇒ Object (also: #day)
- #hours ⇒ Object (also: #hour)
- #mins ⇒ Object (also: #minutes, #min)
- #secs ⇒ Object (also: #seconds, #sec)
Instance Method Details
#ago ⇒ Object
28 29 30 |
# File 'lib/marjoree/time.rb', line 28 def ago Time.new - self end |
#days ⇒ Object Also known as: day
22 23 24 |
# File 'lib/marjoree/time.rb', line 22 def days hours * 24 end |
#hours ⇒ Object Also known as: hour
16 17 18 |
# File 'lib/marjoree/time.rb', line 16 def hours self * 60 * 60 end |
#mins ⇒ Object Also known as: minutes, min
9 10 11 |
# File 'lib/marjoree/time.rb', line 9 def mins self * 60 end |
#secs ⇒ Object Also known as: seconds, sec
2 3 4 |
# File 'lib/marjoree/time.rb', line 2 def secs self end |