Class: EMDirWatcher::RegexpMatcher
- Inherits:
-
Object
- Object
- EMDirWatcher::RegexpMatcher
- Defined in:
- lib/em-dir-watcher/tree.rb
Instance Method Summary collapse
-
#initialize(re) ⇒ RegexpMatcher
constructor
A new instance of RegexpMatcher.
- #matches?(relative_path) ⇒ Boolean
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
117 118 119 |
# File 'lib/em-dir-watcher/tree.rb', line 117 def matches? relative_path relative_path =~ @re end |