Class: RbEAI::NameParser
- Inherits:
-
Object
- Object
- RbEAI::NameParser
- Defined in:
- lib/rbeai/RouterLogic.rb
Instance Method Summary collapse
-
#initialize(node, expression) ⇒ NameParser
constructor
A new instance of NameParser.
- #match(file) ⇒ Object
Constructor Details
#initialize(node, expression) ⇒ NameParser
Returns a new instance of NameParser.
103 104 105 |
# File 'lib/rbeai/RouterLogic.rb', line 103 def initialize(node, expression) @regexp = Regexp.new(expression) end |
Instance Method Details
#match(file) ⇒ Object
107 108 109 110 |
# File 'lib/rbeai/RouterLogic.rb', line 107 def match(file) filename = File.basename(file) return @regexp.match(filename) end |