Method: OpenHAB::CoreExt::Java::Time#<=>
- Defined in:
- lib/openhab/core_ext/java/time.rb
#<=>(other) ⇒ Integer
Compare against another time object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/openhab/core_ext/java/time.rb', line 40 def <=>(other) logger.trace { "(#{self.class}) #{self} <=> #{other} (#{other.class})" } if other.is_a?(self.class) compare_to(other) elsif other.respond_to?(:coerce) return nil unless (lhs, rhs = other.coerce(self)) lhs <=> rhs end end |