build (Gem::Indexer::AbstractIndexBuilder)

    # File lib/rubygems/indexer/abstract_index_builder.rb, line 28
      def build
        FileUtils.mkdir_p @directory unless File.exist? @directory
        raise "not a directory: #{@directory}" unless File.directory? @directory

        file_path = File.join @directory, @filename

        @files << file_path

        File.open file_path, "wb" do |file|
          @file = file
          start_index
          yield
          end_index
        end
        cleanup
      ensure
        @file = nil
      end