Method: ActiveSupport::Duration#<=>
- Defined in:
- activesupport/lib/active_support/duration.rb
#<=>(other) ⇒ Object
Compares one Duration with another or a Numeric to this Duration. Numeric values are treated as seconds.
258 259 260 261 262 263 264 |
# File 'activesupport/lib/active_support/duration.rb', line 258 def <=>(other) if Duration === other value <=> other.value elsif Numeric === other value <=> other end end |