Class: Integer
Instance Method Summary collapse
- #months ⇒ Object (also: #month)
- #years ⇒ Object (also: #year)
Instance Method Details
#months ⇒ Object 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 |
#years ⇒ Object 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 |