Method: ActiveSupport::Duration#ago

Defined in:
activesupport/lib/active_support/duration.rb

#ago(time = ::Time.current) ⇒ Object Also known as: until, before

Calculates a new Time or Date that is as far in the past as this Duration represents.



444
445
446
# File 'activesupport/lib/active_support/duration.rb', line 444

def ago(time = ::Time.current)
  sum(-1, time)
end