instance method
months
Ruby on Rails 7.2.3
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 10
def months
ActiveSupport::Duration.months(self)
end
Defined in activesupport/lib/active_support/core_ext/integer/time.rb line 10
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Integer