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: config_file.rb
    path of file: ./repos/sinatra/sinatra-contrib/lib/sinatra
    
    the code of the file until where you have to start completion: require 'sinatra/base'
require 'yaml'
require 'erb'

module Sinatra
  # = Sinatra::ConfigFil
    
    def config_file(*paths)
      Dir.chdir(root || '.') do
        paths.each do |pattern|
          Dir.glob(pattern) do |file|
            raise UnsupportedConfigType unless ['.yml', '.yaml', '.erb'].include?(File.extname(file))

            logger.info "loading config file '#{file}'" if logging? && respond_to?(:logger)
            document = ERB.new(File.read(file)).result
            yaml = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(document) : YAML.load(document)
            config = config_for_env(yaml)
            config.each_pair { |key, value| set(key, value) }
          end
        end
      end
    end