class Querly::Pattern::Expr::ReceiverContext

Attributes

receiver[R]

Public Class Methods

new(receiver:) click to toggle source
# File lib/querly/pattern/expr.rb, line 286
def initialize(receiver:)
  @receiver = receiver
end

Public Instance Methods

test_node(node) click to toggle source
# File lib/querly/pattern/expr.rb, line 290
def test_node(node)
  if receiver.test_node(node)
    true
  else
    type = node&.type
    (type == :send || type == :csend) && test_node(node.children[0])
  end
end