module Conpar::Directive::AccessList

Module for ACL line classes See www.cisco.com/c/en/us/td/docs/security/asa/asa91/configuration/general/asa_91_general_config/acl_overview.html

Constants

SIGNATURE

Public Instance Methods

new(line, options={}) click to toggle source
# File lib/conpar/directive/access_list.rb, line 12
def new(line, options={})
  # Shallow ACL Test - Is the line any type of ACL?
  if line =~ SIGNATURE
    # Deeper ACL Testing - Which type of ACL is it?
    [
      Remark,
      Standard,
      WebType,
      EtherType,
      Extended
    ].each do |klass|
      if line =~ klass::SIGNATURE
        return klass.new(line, options)
      end
    end
    # If no match yet, use base ACL type
    return UnknownType.new(line, options)
  end
end