instance method
months
Ruby on Rails edge
Since v3.0.20Signature
months()
Returns a Duration instance matching the number of months provided.
“‘ 2.months # => 2 months “`
Source
# File activesupport/lib/active_support/core_ext/integer/time.rb, line 12
def months
ActiveSupport::Duration.months(self)
end
Defined in activesupport/lib/active_support/core_ext/integer/time.rb line 12
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Integer