Class: Machete::Matchers::IndifferentRegexpMatcher
- Inherits:
-
RegexpMatcher
- Object
- Matcher
- RegexpMatcher
- Machete::Matchers::IndifferentRegexpMatcher
- Defined in:
- lib/machete/matchers.rb
Instance Attribute Summary
Attributes inherited from RegexpMatcher
Instance Method Summary collapse
Methods inherited from RegexpMatcher
Constructor Details
This class inherits a constructor from Machete::Matchers::RegexpMatcher
Instance Method Details
#matches?(node) ⇒ Boolean
161 162 163 164 |
# File 'lib/machete/matchers.rb', line 161 def matches?(node) (node.is_a?(Symbol) && node.to_s =~ @regexp) || (node.is_a?(String) && node =~ @regexp) end |