class ACL::ACLEntry
def initialize(str)
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 IPAddr::InvalidPrefixError # In this case, `str` shouldn't be a host name pattern # because it contains a slash. raise rescue ArgumentError @pat = [:name, dot_pat(str)] end end end