Class: RbEAI::NameParser

Inherits:
Object
  • Object
show all
Defined in:
lib/rbeai/RouterLogic.rb

Instance Method Summary collapse

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