Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/as/duration/core_ext/integer.rb
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/as/duration/core_ext/integer.rb', line 2 def months AS::Duration.new(self * 30*24*60*60, [[:months, self]]) end |
#years ⇒ Object Also known as: year
7 8 9 |
# File 'lib/as/duration/core_ext/integer.rb', line 7 def years AS::Duration.new(self * 365*24*60*60, [[:years, self]]) end |