Class: EMDirWatcher::RegexpMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/em-dir-watcher/tree.rb

Instance Method Summary collapse

Constructor Details

#initialize(re) ⇒ RegexpMatcher

Returns a new instance of RegexpMatcher.



114
115
116
# File 'lib/em-dir-watcher/tree.rb', line 114

def initialize re
  @re = re
end

Instance Method Details

#matches?(relative_path) ⇒ Boolean

Returns:

  • (Boolean)


117
118
119
# File 'lib/em-dir-watcher/tree.rb', line 117

def matches? relative_path
  relative_path =~ @re
end