Method: Integer#months

Defined in:
lib/active_support/core_ext/integer/time.rb

#monthsObject Also known as: month

Returns a Duration instance matching the number of months provided.

2.months # => 2 months


10
11
12
# File 'lib/active_support/core_ext/integer/time.rb', line 10

def months
  ActiveSupport::Duration.months(self)
end