Class: Machete::Matchers::SymbolRegexpMatcher

Inherits:
RegexpMatcher show all
Defined in:
lib/machete/matchers.rb

Instance Attribute Summary

Attributes inherited from RegexpMatcher

#regexp

Instance Method Summary collapse

Methods inherited from RegexpMatcher

#==, #initialize

Constructor Details

This class inherits a constructor from Machete::Matchers::RegexpMatcher

Instance Method Details

#matches?(node) ⇒ Boolean

Returns:

  • (Boolean)


149
150
151
# File 'lib/machete/matchers.rb', line 149

def matches?(node)
  node.is_a?(Symbol) && node.to_s =~ @regexp
end