Flowdock
method

gen_into

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: HTML

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_1_378) is shown here.

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
      end
      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
      end
    end
  end
Register or log in to add new notes.