You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: local_resource_registry.rb
    path of file: ./repos/mongo-ruby-driver/spec/support
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# rubocop:todo all

require 'singleton'

class LocalResourceRegi
    
  def close_all
    @resources.each do |resource, finalizer|
      if finalizer.is_a?(Symbol)
        resource.send(finalizer)
      elsif finalizer.is_a?(Proc)
        finalizer.call(resource)
      else
        raise "Unknown finalizer: #{finalizer}"
      end
    end