class RDoc::Generator::Darkfish

def generate_table_of_contents

def generate_table_of_contents
  template_file = @template_dir + 'table_of_contents.rhtml'
  return unless template_file.exist?
  debug_msg "Rendering the Table of Contents..."
  out_file = @outputdir + 'table_of_contents.html'
  rel_prefix = @outputdir.relative_path_from out_file.dirname
  search_index_rel_prefix = rel_prefix
  search_index_rel_prefix += @asset_rel_path if @file_output
  asset_rel_prefix = rel_prefix + @asset_rel_path
  @title = "Table of Contents - #{@options.title}"
  render_template template_file, out_file do |io|
    here = binding
    # suppress 1.9.3 warning
    here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
    here
  end
rescue => e
  error = RDoc::Error.new \
    "error generating table_of_contents.html: #{e.message} (#{e.class})"
  error.set_backtrace e.backtrace
  raise error
end