Method: Timedelta#<=>
- Defined in:
- lib/units-time/timedelta.rb
#<=>(other) ⇒ Object
98 99 100 101 102 103 104 |
# File 'lib/units-time/timedelta.rb', line 98 def <=>( other ) if other.is_a?( self.class ) @seconds <=> other.seconds else raise TypeError.new( "[Timedelta] <=> - wrong type >#{other.inspect}< #{other.class.name} - Timedelta expected" ) end end |