Module: Loom::Pattern::ExpandingReference::Matcher::GlobMatcher
- Defined in:
- lib/loom/pattern/expanding_reference.rb
Constant Summary collapse
- MATCH_P =
/(\*)$/
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#match?(your_pattern) ⇒ Boolean
74 75 76 77 78 |
# File 'lib/loom/pattern/expanding_reference.rb', line 74 def match?(your_pattern) prefix = @my_slug.to_s.gsub(MATCH_P, "") Loom.log.debug2(self) { "GlobMatcher+match?+ #{@my_slug} #{your_pattern}, prefix: #{prefix}"} your_pattern.to_s.start_with? prefix end |