Class: Querly::Pattern::Expr::Not

Inherits:
Base
  • Object
show all
Defined in:
lib/querly/pattern/expr.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #=~, #attributes

Constructor Details

#initialize(pattern:) ⇒ Not

Returns a new instance of Not.



33
34
35
# File 'lib/querly/pattern/expr.rb', line 33

def initialize(pattern:)
  @pattern = pattern
end

Instance Attribute Details

#patternObject (readonly)

Returns the value of attribute pattern.



31
32
33
# File 'lib/querly/pattern/expr.rb', line 31

def pattern
  @pattern
end

Instance Method Details

#test_node(node) ⇒ Object



37
38
39
# File 'lib/querly/pattern/expr.rb', line 37

def test_node(node)
  !pattern.test_node(node)
end