new(str)
public
Creates a new entry using
str.
str may be “*” or “all” to match any address, an IP address string
to match a specific address, an IP
address mask per IPAddr, or one containing
“*” to match part of an IPv4
address.
Show source
def initialize(str)
if str == '*' or str == 'all'
@pat = [:all]
elsif str.include?('*')
@pat = [:name, dot_pat(str)]
else
begin
@pat = [:ip, IPAddr.new(str)]
rescue ArgumentError
@pat = [:name, dot_pat(str)]
end
end
end