ruby-win32/lib/ruby/site_ruby/1.8/rubygems/indexer/abstract_index_builder.rb
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
# Build a Gem index.  Yields to block to handle the details of the
# actual building.  Calls +begin_index+, +end_index+ and +cleanup+ at
# appropriate times to customize basic operations.
Build a Gem index.  Yields to block to handle the details of the
actual building.
Build a Gem index . Yields to block to handle the details of the actual building .
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
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
Build a Gem index.
Build a Gem index .