module RuboCop::AST::NodePattern::Macros

def def_node_search(method_name, pattern_str, **keyword_defaults)

yield all descendants which match.
as soon as it finds a descendant which matches. Otherwise, it will
If the method name ends with '?', the new method will return `true`

checking whether any of them match the provided pattern
Define a method which recurses over the descendants of an AST node,
def def_node_search(method_name, pattern_str, **keyword_defaults)
  NodePattern.new(pattern_str).def_node_search(self, method_name, **keyword_defaults)
end