Class: CiscoAclIntp::AceTcpFlagList
- Inherits:
-
AceSpecBase
- Object
- AccessControlContainer
- AceSpecBase
- CiscoAclIntp::AceTcpFlagList
- Extended by:
- Forwardable
- Defined in:
- lib/cisco_acl_intp/acespec_tcp_flags.rb
Overview
TCP flag list container
Constant Summary
Constants inherited from AccessControlContainer
CiscoAclIntp::AccessControlContainer::TERM_COLOR_TABLE
Instance Attribute Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#initialize(list = []) ⇒ AceTcpFlagList
constructor
Constructor.
-
#to_s ⇒ String
Generate string for Cisco IOS access list.
Methods inherited from AccessControlContainer
#clean_acl_string, disable_color, #generate_tag_footer, #generate_tag_header, #generate_tagged_str, #method_missing
Constructor Details
#initialize(list = []) ⇒ AceTcpFlagList
TODO:
If the object that are same are included in the list?
Constructor
46 47 48 |
# File 'lib/cisco_acl_intp/acespec_tcp_flags.rb', line 46 def initialize(list = []) @list = list end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CiscoAclIntp::AccessControlContainer
Instance Attribute Details
#list ⇒ Array
39 40 41 |
# File 'lib/cisco_acl_intp/acespec_tcp_flags.rb', line 39 def list @list end |
Instance Method Details
#==(other) ⇒ Boolean
Note:
Checked each entry in randum order.
59 60 61 62 63 |
# File 'lib/cisco_acl_intp/acespec_tcp_flags.rb', line 59 def ==(other) @list.reduce(true) do |res, each| res && other.list.include?(each) end end |
#to_s ⇒ String
Generate string for Cisco IOS access list
52 53 54 |
# File 'lib/cisco_acl_intp/acespec_tcp_flags.rb', line 52 def to_s tag_port(@list.map(&:to_s).join(' ')) end |