Class: Treebis::DirAsHash::Blacklist::StringMatcher
- Inherits:
-
MatcherWithTail
- Object
- MatcherWithTail
- Treebis::DirAsHash::Blacklist::StringMatcher
- Defined in:
- lib/treebis.rb
Instance Method Summary collapse
- #head_include?(str) ⇒ Boolean
-
#initialize(str, tail = nil) ⇒ StringMatcher
constructor
A new instance of StringMatcher.
Methods inherited from MatcherWithTail
#include?, #submatcher, #tail=
Methods included from MatcherFactory
Constructor Details
#initialize(str, tail = nil) ⇒ StringMatcher
Returns a new instance of StringMatcher.
306 307 308 309 |
# File 'lib/treebis.rb', line 306 def initialize str, tail=nil @head = str self.tail = tail end |
Instance Method Details
#head_include?(str) ⇒ Boolean
310 311 312 |
# File 'lib/treebis.rb', line 310 def head_include? str @head == str end |