class RuboCop::RSpec::ExampleGroup

def find_all_in_scope(node, predicate)

Returns:
  • (Array) - discovered nodes

Parameters:
  • predicate (Symbol) -- method to call with node as argument
  • node (RuboCop::AST::Node) -- node to recursively search
def find_all_in_scope(node, predicate)
  node.each_child_node.flat_map do |child|
    find_all(child, predicate)
  end
end