method
generate_index
v1_9_2_180 -
Show latest stable
- Class:
RDoc::Generator::Darkfish
generate_index()protected
Generate an index page which lists all the classes which are documented.
# File lib/rdoc/generator/darkfish.rb, line 219
def generate_index
template_file = @template_dir + 'index.rhtml'
return unless template_file.exist?
debug_msg "Rendering the index page..."
template_src = template_file.read
template = ERB.new( template_src, nil, '<>' )
template.filename = template_file.to_s
context = binding()
output = nil
begin
output = template.result( context )
rescue NoMethodError => err
raise RDoc::Error, "Error while evaluating %s: %s (at %p)" % [
template_file,
err.message,
eval( "_erbout[-50,50]", context )
], err.backtrace
end
outfile = @basedir + @options.op_dir + 'index.html'
unless $DARKFISH_DRYRUN
debug_msg "Outputting to %s" % [outfile.expand_path]
outfile.open( 'w', 0644 ) do |fh|
fh.print( output )
end
else
debug_msg "Would have output to %s" % [outfile.expand_path]
end
end Related methods
- Instance methods
- class_dir
- debug_msg
- file_dir
- gen_sub_directories
- generate
- write_style_sheet
- Class methods
- for
- new
- Protected methods
-
generate_class_files -
generate_file_files -
generate_index -
get_sorted_module_list -
get_svninfo -
render_template -
time_delta_string