StdlibDoc::GenDoc::Packaging (Class)

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

This class knows how to generate the packaging files for the documentation: index.html, table of contents, overview, status.

The HTML generation is performed by Amrita. The theme is: generate a hash of values (generally based on a list of targets), load an Amrita template, feed it the hash, and spit out the results into the target HTML file.

Methods

generate   new  

Public Class methods

TODO: allow parameters for status and gendoc DBs?

config is a StdlibDoc::Config object.

[Source]

# File StdlibDoc/GenDoc/Packaging.rb, line 30
    def initialize(config)
      @config    = config
      @gendoc_db = StdlibDoc::GenDoc::Database.new(config)
      @status_db = StdlibDoc::Status::Database.new
      @targets   = @gendoc_db.targets
      @records   = @status_db.records
    end

Public Instance methods

Targets (relative to document output base directory):

index.html:frames, copied from data/index.html
toc.html:table of contents, left frame, generated with template in data/toc.tmpl
overview.html:overview of packages, generated with template in data/overview.tmpl
status.html:status report on documentation, generated with template in data/status.tmpl

[Source]

# File StdlibDoc/GenDoc/Packaging.rb, line 45
    def generate
      puts "Packaging.generate"
      FileUtils::Verbose.mkdir(@config.doc_base) unless @config.doc_base.directory?
      _copy_static_data
      _gen_toc
      _gen_download
      _gen_packages_overview
      _gen_status_report
    end

[Validate]