Class: Bigrig::GoMatcher
- Inherits:
-
Object
- Object
- Bigrig::GoMatcher
- Defined in:
- lib/bigrig/go_matcher.rb
Constant Summary collapse
- ESCAPES =
['.', '(', ')']
- REPLACES =
{ /^\/?/ => '', /^/ => '^', /$/ => '/', '?' => '[^/]', '+' => '\\\\+', '*' => '[^/]+' }
Instance Method Summary collapse
-
#initialize(glob) ⇒ GoMatcher
constructor
A new instance of GoMatcher.
- #matches?(path) ⇒ Boolean
Constructor Details
Instance Method Details
#matches?(path) ⇒ Boolean
23 24 25 |
# File 'lib/bigrig/go_matcher.rb', line 23 def matches?(path) @regex.match("#{path}/") != nil end |