This generates Texinfo files for viewing with GNU Info or Emacs from RDoc extracted from Ruby source files.
What should the .info file be named by default?
Accept some options
# File rdoc/generator/texinfo.rb, line 16 def initialize(options) @options = options @options.inline_source = true @options.op_name ||= 'rdoc.texinfo' @options.formatter = ::RDoc::Markup::ToTexInfo.new end
Generate the texinfo
files
# File rdoc/generator/texinfo.rb, line 24 def generate(toplevels) @toplevels = toplevels @files, @classes = ::RDoc::Generator::Context.build_indices(@toplevels, @options) (@files + @classes).each { |x| x.value_hash } open(@options.op_name, 'w') do |f| f.puts TexinfoTemplate.new('files' => @files, 'classes' => @classes, 'filename' => @options.op_name.gsub(/texinfo/, 'info'), 'title' => @options.title).render end # TODO: create info files and install? end