]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/libraries/ipaddresses.rb
Add comparison operator for IP addresses
[chef.git] / cookbooks / networking / libraries / ipaddresses.rb
index 8efba26de195624e0196e5d61ae9a193ea8f4330..89b20fe9e9d13a81bcb4c4eb2bfc4e85c0b5727a 100644 (file)
@@ -17,6 +17,10 @@ module OpenStreetMap
           @netmask = ip.netmask
         end
 
+        def <=>(other)
+          address <=> other.address
+        end
+
         def to_s
           address
         end