X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2835205c501da417ff80ce4f06dc32d14c8c38bb..e92ed5e09215d67f2bd7dc21a32425d7ec5aa26f:/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