Class: CiscoAclIntp::AceRecursiveQualifier

Inherits:
AceOtherQualifierBase show all
Defined in:
lib/cisco_acl_intp/acespec_other_qualifiers.rb

Overview

Recursive qualifier container

Constant Summary

Constants inherited from AccessControlContainer

CiscoAclIntp::AccessControlContainer::TERM_COLOR_TABLE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AccessControlContainer

#clean_acl_string, disable_color, #generate_tag_footer, #generate_tag_header, #generate_tagged_str, #method_missing

Constructor Details

#initialize(name) ⇒ AceRecursiveQualifier

Constructor

Parameters:

  • name (String)

    Recursive name



92
93
94
95
96
97
98
# File 'lib/cisco_acl_intp/acespec_other_qualifiers.rb', line 92

def initialize(name)
  if name && !name.empty?
    @recursive_name = name
  else
    raise AclArgumentError, 'Not specified recursive name'
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class CiscoAclIntp::AccessControlContainer

Instance Attribute Details

#recursive_nameString

Parameters:

  • value (String)

    Recursive name

Returns:

  • (String)


88
89
90
# File 'lib/cisco_acl_intp/acespec_other_qualifiers.rb', line 88

def recursive_name
  @recursive_name
end

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


108
109
110
111
# File 'lib/cisco_acl_intp/acespec_other_qualifiers.rb', line 108

def ==(other)
  other.instance_of?(AceRecursiveQualifier) &&
    @recursive_name == other.recursive_name
end

#to_sString

Generate string for Cisco IOS access list

Returns:

  • (String)


102
103
104
# File 'lib/cisco_acl_intp/acespec_other_qualifiers.rb', line 102

def to_s
  format 'reflect %s', tag_name(@recursive_name)
end