lib/vnstat/result/hour.rb in vnstat-ruby-2.0.0 vs lib/vnstat/result/hour.rb in vnstat-ruby-3.0.0
- old
+ new
@@ -47,9 +47,10 @@
##
# @return [Integer, nil]
def <=>(other)
return nil unless other.respond_to?(:bytes_transmitted)
return nil unless other.respond_to?(:time)
+
[time, bytes_transmitted] <=> [other.time, other.bytes_transmitted]
end
##
# The time the result was captured.