Class: CiscoAclIntp::RemarkAce
- Inherits:
-
AceBase
- Object
- AccessControlContainer
- AceBase
- CiscoAclIntp::RemarkAce
- Defined in:
- lib/cisco_acl_intp/ace_base.rb
Overview
Remark entry container
Constant Summary
Constants inherited from AceBase
Constants inherited from AccessControlContainer
AccessControlContainer::TERM_COLOR_TABLE
Instance Attribute Summary collapse
Attributes inherited from AceBase
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Check equality.
-
#contains?(_opts = nil) ⇒ Boolean
Search matched ACE return [Boolean] false, Remark does not match anithyng.
-
#initialize(str) ⇒ RemarkAce
constructor
Constructor.
-
#to_s ⇒ String
Generate string for Cisco IOS access list.
Methods inherited from AceBase
Methods inherited from AccessControlContainer
#clean_acl_string, disable_color, #generate_tag_footer, #generate_tag_header, #generate_tagged_str, #method_missing
Constructor Details
#initialize(str) ⇒ RemarkAce
Constructor
73 74 75 76 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 73 def initialize(str) @comment = str.strip @seq_number = NO_SEQ_NUMBER # remark does not takes line number end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CiscoAclIntp::AccessControlContainer
Instance Attribute Details
#comment ⇒ String
68 69 70 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 68 def comment @comment end |
Instance Method Details
#==(other) ⇒ Boolean
Check equality
80 81 82 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 80 def ==(other) other.instance_of?(RemarkAce) && @comment == other.comment end |
#contains?(_opts = nil) ⇒ Boolean
Search matched ACE return [Boolean] false, Remark does not match anithyng.
93 94 95 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 93 def contains?(_opts = nil) false end |
#to_s ⇒ String
Generate string for Cisco IOS access list
86 87 88 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 86 def to_s format 'remark %s', tag_remark(@comment.to_s) end |