instance method
<=>
Ruby on Rails 8.0.4
Since v5.2.8.1Signature
<=>(other)
Compares one Duration with another or a Numeric to this Duration. Numeric values are treated as seconds.
Parameters
-
otherreq
Source
# File activesupport/lib/active_support/duration.rb, line 258
def <=>(other)
if Duration === other
value <=> other.value
elsif Numeric === other
value <=> other
end
end
Defined in activesupport/lib/active_support/duration.rb line 258
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Duration