Class: Evilution::AST::Pattern::NegationMatcher Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/ast/pattern/matcher.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

Constructor Details

#initialize(inner) ⇒ NegationMatcher

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 a new instance of NegationMatcher.



95
96
97
# File 'lib/evilution/ast/pattern/matcher.rb', line 95

def initialize(inner)
  @inner = inner
end

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.

Returns:

  • (Boolean)


103
104
105
# File 'lib/evilution/ast/pattern/matcher.rb', line 103

def match?(node)
  !@inner.match?(node)
end

#match_value?(actual) ⇒ 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)


99
100
101
# File 'lib/evilution/ast/pattern/matcher.rb', line 99

def match_value?(actual)
  !@inner.match_value?(actual)
end