X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2835205c501da417ff80ce4f06dc32d14c8c38bb..31f1fa863c0b208a44e10ef3ae1571024ef0f0ae:/cookbooks/networking/libraries/ipaddresses.rb diff --git a/cookbooks/networking/libraries/ipaddresses.rb b/cookbooks/networking/libraries/ipaddresses.rb index 8efba26de..5f746c9aa 100644 --- a/cookbooks/networking/libraries/ipaddresses.rb +++ b/cookbooks/networking/libraries/ipaddresses.rb @@ -17,10 +17,18 @@ module OpenStreetMap @netmask = ip.netmask end + def <=>(other) + address <=> other.address + end + def to_s address end + def to_str + address + end + def subnet "#{@network}/#{@prefix}" end