Class: CiscoAclIntp::EvaluateAce
- Inherits:
-
AceBase
- Object
- AccessControlContainer
- AceBase
- CiscoAclIntp::EvaluateAce
- Defined in:
- lib/cisco_acl_intp/ace_base.rb
Overview
Evaluate 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
Compare with recursive entry name.
-
#contains?(_opts = nil) ⇒ Boolean
Search matched ACE return [Boolean].
-
#define_recursive_name ⇒ Object
Set instance variables return [String] Recursive entry name raise [AclArgumentError].
-
#initialize(opts) ⇒ EvaluateAce
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(opts) ⇒ EvaluateAce
Constructor
110 111 112 113 114 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 110 def initialize(opts) super @options = opts @recursive_name = define_recursive_name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CiscoAclIntp::AccessControlContainer
Instance Attribute Details
#recursive_name ⇒ String
102 103 104 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 102 def recursive_name @recursive_name end |
Instance Method Details
#==(other) ⇒ Boolean
Returns Compare with recursive entry name.
128 129 130 131 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 128 def ==(other) other.instance_of?(EvaluateAce) && @recursive_name == other.recursive_name end |
#contains?(_opts = nil) ⇒ Boolean
for Recursive name matching is not implemented yet
Search matched ACE return [Boolean]
143 144 145 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 143 def contains?(_opts = nil) false end |
#define_recursive_name ⇒ Object
Set instance variables return [String] Recursive entry name raise [AclArgumentError]
119 120 121 122 123 124 125 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 119 def define_recursive_name if @options.key?(:recursive_name) @options[:recursive_name] else raise AclArgumentError, 'name not specified' end end |
#to_s ⇒ String
Generate string for Cisco IOS access list
135 136 137 |
# File 'lib/cisco_acl_intp/ace_base.rb', line 135 def to_s format 'evaluate %s', tag_name(@recursive_name) end |