Class: Fixnum

Inherits:
Object
  • Object
show all
Defined in:
lib/marjoree/time.rb

Instance Method Summary collapse

Instance Method Details

#agoObject



28
29
30
# File 'lib/marjoree/time.rb', line 28

def ago
  Time.new - self
end

#daysObject Also known as: day



22
23
24
# File 'lib/marjoree/time.rb', line 22

def days
  hours * 24
end

#hoursObject Also known as: hour



16
17
18
# File 'lib/marjoree/time.rb', line 16

def hours
  self  * 60 * 60
end

#minsObject Also known as: minutes, min



9
10
11
# File 'lib/marjoree/time.rb', line 9

def mins
  self  * 60
end

#secsObject Also known as: seconds, sec



2
3
4
# File 'lib/marjoree/time.rb', line 2

def secs
  self
end