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: directory_provider.rb
    path of file: ./repos/konfig/lib/konfig
    
    the code of the file until where you have to start completion: require_relative "config_provider"
require "json"

module Konfig
  class DirectoryProvider < ConfigProvider
    def initialize(workdir:)
      super(mode: :yaml, workdir: workdir)
      @files = Dir.children(@workdir)
      # exclude any directories there
      @files = @files.delete_if { |x| File.direc
    
    def build_object_from_list(list)
      Object.send(:remove_const, Konfig.configuration.namespace) if Object.const_defined?(Konfig.configuration.namespace)

      full_hash = {}
      hash_list = build_hash_from_list(list)
      hash_list.each do |item|
        full_hash.deep_merge!(item)
      end

      full_hash = Konfig::EnvReplacer.replace(full_hash)
      os = Konfig::Option.new
      full_hash = os.load(full_hash)
      Object.const_set(Konfig.configuration.namespace, full_hash)
    end