In Files

  • rdoc/generator/texinfo.rb

Parent

Included Modules

Files

Class/Module Index [+]

Quicksearch

RDoc::Generator::TEXINFO

This generates Texinfo files for viewing with GNU Info or Emacs from RDoc extracted from Ruby source files.

Constants

DEFAULT_INFO_FILENAME

What should the .info file be named by default?

Public Class Methods

for(options) click to toggle source

Factory? We don’t need no stinkin’ factory!

Alias for: new
new(options) click to toggle source

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
            
Also aliased as: for

Public Instance Methods

generate(toplevels) click to toggle source

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
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus