instance method
hours
Ruby on Rails 6.0.6
Since v3.0.20Signature
hours()
Returns a Duration instance matching the number of hours provided.
2.hours # => 2 hours
Source
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 29
def hours
ActiveSupport::Duration.hours(self)
end
Defined in activesupport/lib/active_support/core_ext/numeric/time.rb line 29
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Numeric