Class RDoc::Generator::TEXINFO

  1. lib/rdoc/generator/texinfo.rb
Parent: Object
ClassModule NormalModule AnonClass SingleClass NormalClass AnyMethod GhostMethod MetaMethod CodeObject Context Alias Attr Constant Require Include TopLevel RubyLex IRB RuntimeError Error Error Token TkUnknownChar TkVal TkNode TkOp TkId TkError TkOPASGN TkKW AttributeFormatter HtmlFormatter OverstrikeFormatter AnsiFormatter NamedThing AliasName IncludedModule Constant Attribute MethodSummary DefaultDisplay ClassEntry TopLevelEntry Formatter SimpleFormatter Description MethodDescription ModuleDescription ClassDescription HTML XML HTMLInOne CHM Method Context Class File Generator::MarkUp TEXINFO SimpleElement Port Element Node Subgraph Edge Digraph Stats Parser Options RDoc TemplatePage Markup Diagram NameDescriptor Cache Reader Writer Driver MethodEntry RI TexinfoTemplate AllReferences RubyToken Display Paths RI MarkUp Generator TokenStream DOT RDoc dot/f_5.png

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

Methods

public class

  1. new

public instance

  1. generate

Included modules

  1. Generator::MarkUp

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