Class: Treebis::DirAsHash::Blacklist::GlobNodeMatcherDeep
- Inherits:
-
GlobNodeMatcher
- Object
- MatcherWithTail
- GlobNodeMatcher
- Treebis::DirAsHash::Blacklist::GlobNodeMatcherDeep
- Defined in:
- lib/treebis.rb
Instance Method Summary collapse
- #include?(str) ⇒ Boolean
-
#initialize(globtoken, tail) ⇒ GlobNodeMatcherDeep
constructor
A new instance of GlobNodeMatcherDeep.
- #submatcher(str) ⇒ Object
Methods inherited from GlobNodeMatcher
Methods included from MatcherFactory
Methods inherited from MatcherWithTail
Constructor Details
#initialize(globtoken, tail) ⇒ GlobNodeMatcherDeep
Returns a new instance of GlobNodeMatcherDeep.
292 293 294 295 296 |
# File 'lib/treebis.rb', line 292 def initialize globtoken, tail /\*\*/ =~ globtoken or fail("not deep: #{globtoken.inspect}") tail or fail("for now deep globs must look like \"**/*.bar\"") self.tail = tail end |
Instance Method Details
#include?(str) ⇒ Boolean
298 299 300 |
# File 'lib/treebis.rb', line 298 def include? str @tail.include? str end |
#submatcher(str) ⇒ Object
301 302 303 |
# File 'lib/treebis.rb', line 301 def submatcher str self # you just keep travelling down the tree when you're '**' end |