class IPAddr

@private

Constants

PrivateRanges

Public Instance Methods

private?() click to toggle source
# File lib/blather/core_ext/ipaddr.rb, line 9
def private?
  return false unless self.ipv4?
  PrivateRanges.each do |ipr|
    return true if ipr.include?(self)
  end
  return false
end
public?() click to toggle source
# File lib/blather/core_ext/ipaddr.rb, line 17
def public?
  !private?
end