class RuboCop::Cop::VariableForce::VariableTable

def find_variable(name)

def find_variable(name)
  name = name.to_sym
  scope_stack.reverse_each do |scope|
    variable = scope.variables[name]
    return variable if variable
    # Only block scope allows referencing outer scope variables.
    node = scope.node
    return nil unless node.block_type? || node.numblock_type?
  end
  nil
end