This generates Texinfo files for viewing with GNU Info or Emacs from RDoc extracted from Ruby source files.
Included modules
Constants
| DEFAULT_INFO_FILENAME | = | 'rdoc.info' | What should the .info file be named by default? |
External Aliases
| new | -> | for |
| Factory? We don’t need no stinkin’ factory! | ||
Public class methods
new
(options)
Accept some options
[show source]
# File lib/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
Public instance methods
generate
(toplevels)
Generate the texinfo files
[show source]
# File lib/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