Sha256: 73b2bfad706beca227a9c12bd0c04d37393f65dde0a1115899a4725b380948ac
Contents?: true
Size: 337 Bytes
Versions: 37
Compression:
Stored size: 337 Bytes
Contents
# @private class IPAddr PrivateRanges = [ IPAddr.new("10.0.0.0/8"), IPAddr.new("172.16.0.0/12"), IPAddr.new("192.168.0.0/16") ] def private? return false unless self.ipv4? PrivateRanges.each do |ipr| return true if ipr.include?(self) end return false end def public? !private? end end
Version data entries
37 entries across 37 versions & 2 rubygems