Class: CiscoAclIntp::AcePortOpLt

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

Overview

LOWER_THAN 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_gt?, #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) ⇒ AcePortOpLt

Constructor



115
116
117
118
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 115

def initialize(*args)
  super
  @operator = :lt
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)

LT contains EQ?

Parameters:

Returns:

  • (Boolean)


125
126
127
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 125

def contains_eq?(other)
  other.port < @begin_port
end

#contains_lt?(other) ⇒ Boolean (private)

LT contains LT?

Parameters:

Returns:

  • (Boolean)


139
140
141
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 139

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

#contains_neq?(other) ⇒ Boolean (private)

LT contains NEQ?

Parameters:

Returns:

  • (Boolean)


132
133
134
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 132

def contains_neq?(other)
  other.port.max? && @begin_port.max?
end

#contains_range?(other) ⇒ Boolean (private)

LT contains RANGE?

Parameters:

Returns:

  • (Boolean)


146
147
148
# File 'lib/cisco_acl_intp/acespec_port_opr.rb', line 146

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