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: index.rb
    path of file: ./repos/bundler/lib/bundler
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require "set"

module Bundler
  class Index
    include Enumerable

    def self.build
      i = new
      yield i
      i
    end

    attr_reader :s
    
    def unsorted_search(query, base)
      results = local_search(query, base)

      seen = results.map(&:full_name).to_set unless @sources.empty?

      @sources.each do |source|
        source.unsorted_search(query, base).each do |spec|
          results << spec if seen.add?(spec.full_name)
        end
      end

      results
    end