Class: Mutant::AST::Pattern::Node::Attribute Private
- Inherits:
-
Object
- Object
- Mutant::AST::Pattern::Node::Attribute
- Defined in:
- lib/mutant/ast/pattern.rb
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.
Defined Under Namespace
Classes: Value
Instance Method Summary collapse
-
#match?(node) ⇒ Boolean
private
Value.
- #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.
Value
54 55 56 |
# File 'lib/mutant/ast/pattern.rb', line 54 def match?(node) attribute = Structure.for(node.type).attribute(name) and value.match?(attribute.value(node)) 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.
58 59 60 |
# File 'lib/mutant/ast/pattern.rb', line 58 def syntax "#{name}=#{value.syntax}" end |