Class: RbEAI::RexParser
- Inherits:
-
Object
- Object
- RbEAI::RexParser
- Defined in:
- lib/rbeai/RouterLogic.rb
Instance Method Summary collapse
-
#initialize(node, expression) ⇒ RexParser
constructor
A new instance of RexParser.
- #match(file) ⇒ Object
Constructor Details
#initialize(node, expression) ⇒ RexParser
Returns a new instance of RexParser.
87 88 89 90 |
# File 'lib/rbeai/RouterLogic.rb', line 87 def initialize(node, expression) @resultList = node.elements["."].text @regexp = Regexp.new(expression) end |
Instance Method Details
#match(file) ⇒ Object
92 93 94 95 96 97 |
# File 'lib/rbeai/RouterLogic.rb', line 92 def match(file) ario = rio(file) ario > aString mr = @regexp.match(aString) return @resultList.include?(mr[0]) end |