Class: Mutant::AST::Pattern::Node::Attribute::Value::Group Private

Inherits:
Mutant::AST::Pattern::Node::Attribute::Value show all
Includes:
Unparser::Adamantium
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.

Instance Method Summary collapse

Instance Method Details

#match?(value) ⇒ 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.

Returns:

  • (Boolean)


42
43
44
45
46
# File 'lib/mutant/ast/pattern.rb', line 42

def match?(value)
  values.any? do |attribute_value|
    attribute_value.match?(value)
  end
end

#syntaxObject

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.



48
49
50
# File 'lib/mutant/ast/pattern.rb', line 48

def syntax
  "(#{values.map(&:syntax).join(',')})"
end