Method: Numeric#weeks

Defined in:
activesupport/lib/active_support/core_ext/numeric/time.rb

#weeksObject Also known as: week

Returns a Duration instance matching the number of weeks provided.

2.weeks # => 2 weeks


45
46
47
# File 'activesupport/lib/active_support/core_ext/numeric/time.rb', line 45

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