method
gen_into

v1_9_1_378 -
Show latest stable
-
0 notes -
Class: HTML
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
gen_into(list)
private
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