Class: Integer

Inherits:
Object show all
Defined in:
lib/poolparty/core/integer.rb

Instance Method Summary collapse

Instance Method Details

#monthsObject Also known as: month


2
3
4
# File 'lib/poolparty/core/integer.rb', line 2

def months
  PoolParty::Duration.new(self * 30.days, [[:months, self]])
end

#yearsObject Also known as: year


7
8
9
# File 'lib/poolparty/core/integer.rb', line 7

def years
  PoolParty::Duration.new(self * 365.25.days, [[:years, self]])
end