Method: Numeric#hours

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

#hoursObject Also known as: hour

Returns a Duration instance matching the number of hours provided.

2.hours # => 2 hours


29
30
31
# File 'activesupport/lib/active_support/core_ext/numeric/time.rb', line 29

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