v1_9_1_378 - Show latest stable - 0 notes - Class: HTML
gen_into(list) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rdoc/generator/html.rb, line 198
  def gen_into(list)
    # The file, class, and method lists technically should be regenerated
    # for every output file, in order that the relative links be correct
    # (we are worried here about frameless templates, which need this
    # information for every generated page).  Doing this is a bit slow,
    # however.  For a medium-sized gem, this increased rdoc's runtime by
    # about 5% (using the 'time' command-line utility).  While this is not
    # necessarily a problem, I do not want to pessimize rdoc for large
    # projects, however, and so we only regenerate the lists when the
    # directory of the output file changes, which seems like a reasonable
    # optimization.
    file_list = {}
    class_list = {}
    method_list = {}
    prev_op_dir = nil

    list.each do |item|
      next unless item.document_self

      op_file = item.path
      op_dir = File.dirname(op_file)

      if(op_dir != prev_op_dir)
        file_list = index_to_links op_file, @files
        class_list = index_to_links op_file, @classes
        method_list = index_to_links op_file, RDoc::Generator::Method.all_methods
      prev_op_dir = op_dir

      FileUtils.mkdir_p op_dir

      open op_file, 'w' do |io|
        item.write_on io, file_list, class_list, method_list
Register or log in to add new notes.