Class: Mutant::AST::Pattern::Node::Descendant Private
- Inherits:
-
Object
- Object
- Mutant::AST::Pattern::Node::Descendant
- Defined in:
- lib/mutant/ast/pattern.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Attribute
Instance Method Summary collapse
- #match?(node) ⇒ Boolean private
- #syntax ⇒ Object private
Instance Method Details
#match?(node) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
66 67 68 69 70 |
# File 'lib/mutant/ast/pattern.rb', line 66 def match?(node) descendant = Structure.for(node.type).descendant(name).value(node) !descendant.nil? && pattern.match?(descendant) end |
#syntax ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
72 73 74 |
# File 'lib/mutant/ast/pattern.rb', line 72 def syntax "#{name}=#{pattern.syntax}" end |