Method: Numeric#seconds

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

#secondsObject Also known as: second

Returns a Duration instance matching the number of seconds provided.

2.seconds # => 2 seconds


13
14
15
# File 'activesupport/lib/active_support/core_ext/numeric/time.rb', line 13

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