StdlibDoc::GenDoc::GenDoc (Class)

In: StdlibDoc/GenDoc/GenDoc.rb
Parent: Object

This class implements, as a facade, the actual "business processes" for generating documentation.

Public Class methods

options contains standard configuration information (see StdlibDoc::Config) as well as application-specific options, like the selected targets, whether rdoc generation should be forced, etc.

[Source]

# File StdlibDoc/GenDoc/GenDoc.rb, line 22
    def initialize(options)
      @options = options
      @database = Database.new(@options.config)
      @targets = @database.targets
      @generator = RDocGenerator.new(@options)
    end

Public Instance methods

Generate the targets specified in this object’s options structure.

[Source]

# File StdlibDoc/GenDoc/GenDoc.rb, line 32
    def gen_targets
      puts "Generating targets: #{@options.targets.join(', ')}"
      targets = @targets.select { |t| t.target.in? @options.targets }
      targets.each do |t|
        @generator.generate(t)
      end
    end

Generate all targets.

[Source]

# File StdlibDoc/GenDoc/GenDoc.rb, line 43
    def gen_all_targets
      puts "Generating all targets"
      errs = 0
      @targets.each do |t|
        begin
          @generator.generate(t)
        rescue => err
          puts err
          errs += 1
          if errs > 2
            STDERR.puts "Too many errors; quitting"
            return
          end
          next
        end
      end
    end

Generate the packaging files: index.html, table of contents, etc.

[Source]

# File StdlibDoc/GenDoc/GenDoc.rb, line 64
    def gen_packaging
      puts "Generating packaging files"
      Packaging.new(@options.config).generate
    end

Generate everything: all targets and the packaging files.

[Source]

# File StdlibDoc/GenDoc/GenDoc.rb, line 72
    def gen_all
      puts "Generating everything"
      gen_all_targets
      gen_packaging
    end

Examine the given directory to try to find targets that are not included in our target database.

TODO: implement

[Source]

# File StdlibDoc/GenDoc/GenDoc.rb, line 84
    def check_targets(dir)
    end

Verify the contents of the target database.

TODO: implement

[Source]

# File StdlibDoc/GenDoc/GenDoc.rb, line 92
    def verify_database
    end

[Validate]