Method: CiscoAclIntp::Scanner#scan_match_acl_header
- Defined in:
- lib/cisco_acl_intp/scanner.rb
#scan_match_acl_header ⇒ Boolean (private)
Scanner of acl header
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/cisco_acl_intp/scanner.rb', line 86 def scan_match_acl_header case when @ss.scan(/\s*!.*$/), @ss.scan(/\s*#.*$/) ## "!/# comment" and whitespace line, NO-OP when @ss.scan(/\s+/), @ss.scan(/\A\s*\Z/) ## whitespace, NO-OP # @line_queue.push [:WHITESPACE, ""] # for debug when @ss.scan(/(?:access-list)\s+(\d+)\s/) ## Numbered ACL Header ## numbered acl has no difference ## in format between Standard and Extended... @line_queue.push check_numd_acl_type(@ss[1].to_i) when @ss.scan(/(ip\s+access\-list)\s/) ## Named ACL Header @line_queue.push [:NAMED_ACL, @ss[1]] end @ss.matched? end |