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: chefignore.rb
    path of file: ./repos/chef/lib/chef/cookbook
    
    the code of the file until where you have to start completion: # Author:: Daniel DeLeo (<dan@che
    
      def find_ignore_file(path)
        Pathname.new(path).ascend do |dir|
          next unless dir.directory?

          file = dir.join("chefignore")
          return file.expand_path.to_s if file.exist?
        end

        nil
      end