Module: Hosemonkey::Fixnum

Included in:
Fixnum
Defined in:
lib/hosemonkey/ext/fixnum.rb

Instance Method Summary collapse

Instance Method Details

#daysObject



3
4
5
# File 'lib/hosemonkey/ext/fixnum.rb', line 3

def days
  ::Time.now + (60 * 60 * 24 * self)
end

#hoursObject



7
8
9
# File 'lib/hosemonkey/ext/fixnum.rb', line 7

def hours
  ::Time.now + (60 * 60 * self)
end

#monthsObject



15
16
17
# File 'lib/hosemonkey/ext/fixnum.rb', line 15

def months
  ::Time.now.advance(:months => self)
end

#weeksObject



11
12
13
# File 'lib/hosemonkey/ext/fixnum.rb', line 11

def weeks
  ::Time.now + (60 * 60 * 24 * 7 * self)
end

#yearsObject



19
20
21
# File 'lib/hosemonkey/ext/fixnum.rb', line 19

def years
  ::Time.now.advance(:years => self)
end