Class: Havox::RuleExpander
- Inherits:
-
Object
- Object
- Havox::RuleExpander
- Defined in:
- lib/havox/classes/rule_expander.rb
Constant Summary collapse
- SET_VLAN_REGEX =
/SetField\(vlan,\s?(<none>|\d+)\)/
- SET_VLAN_ID_REGEX =
/SetField\(vlan,\s?(?<vlan_id>\d+)\)/
- VLAN_MATCH_REGEX =
/vlanId\s?=\s?(?<vlan_id>\d+)/
- PREDICATE_REGEX =
/\(switch\s?=\s?\d+\s?and(?<pred>.+)\)/
Instance Attribute Summary collapse
-
#expanded_rules ⇒ Object
readonly
Returns the value of attribute expanded_rules.
Instance Method Summary collapse
-
#initialize(raw_rules) ⇒ RuleExpander
constructor
A new instance of RuleExpander.
Constructor Details
#initialize(raw_rules) ⇒ RuleExpander
Returns a new instance of RuleExpander.
10 11 12 13 14 15 16 |
# File 'lib/havox/classes/rule_expander.rb', line 10 def initialize(raw_rules) @raw_rules = raw_rules @vlan_predicates = {} @expanded_rules = [] scan_vlan_predicates end |
Instance Attribute Details
#expanded_rules ⇒ Object (readonly)
Returns the value of attribute expanded_rules.
3 4 5 |
# File 'lib/havox/classes/rule_expander.rb', line 3 def @expanded_rules end |