Class: CiscoAclIntp::AcePortOpNeq

Inherits:
AceUnaryOpBase show all
Defined in:
lib/cisco_acl_intp/acespec_port_opr.rb

Overview

NOT_EQUAL operator class

Constant Summary

Constants inherited from AccessControlContainer

CiscoAclIntp::AccessControlContainer::TERM_COLOR_TABLE

Instance Attribute Summary

Attributes inherited from AcePortOperatorBase

#begin_port, #end_port, #operator

Instance Method Summary collapse

Methods inherited from AcePortOperatorBase

#==, #check_any_operator, #contains?, #contains_any?, #contains_strict_any?, #to_s

Methods inherited from AccessControlContainer

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

Constructor Details

#initialize(*args) ⇒ AcePortOpNeq

Constructor



69
70
71
72
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 69

def initialize(*args)
  super
  @operator = :neq
end

Dynamic Method Handling

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

Instance Method Details

#contains_eq?(other) ⇒ Boolean (private)

NEQ contains EQ?

Parameters:

Returns:

  • (Boolean)


79
80
81
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 79

def contains_eq?(other)
  other.port != @begin_port
end

#contains_gt?(other) ⇒ Boolean (private)

NEQ contains GT?

Parameters:

Returns:

  • (Boolean)


100
101
102
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 100

def contains_gt?(other)
  @begin_port <= other.port
end

#contains_lt?(other) ⇒ Boolean (private)

NEQ contains LT?

Parameters:

Returns:

  • (Boolean)


93
94
95
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 93

def contains_lt?(other)
  other.port <= @begin_port
end

#contains_neq?(other) ⇒ Boolean (private)

NEQ contains NEQ?

Parameters:

Returns:

  • (Boolean)


86
87
88
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 86

def contains_neq?(other)
  other.port == @begin_port
end

#contains_range?(other) ⇒ Boolean (private)

NEQ contains RANGE?

Parameters:

Returns:

  • (Boolean)


107
108
109
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 107

def contains_range?(other)
  other.end_port < @begin_port || @begin_port < other.begin_port
end