#!/usr/bin/env ruby # Generate RDocs # Check for 'doc' directory. # (Helps to ensure we're in the right place.) require 'ratchets/batch' dir! 'doc' # Load rdoc configuration. config = config_load('rdoc') config = { 'template' => 'html', 'op' => 'doc/rdoc', 'merge' => true, 'inline-source' => true, 'exclude' => %w{ InstalledFiles Manifest Project dev util }, 'include' => %w{ [A-Z]* lib } }.update config # Prepare command arguments. vector = config_vector(config, 'include') # Remove old rdocs, if any. dir = config['op'] abort "bad ouput directory #{dir}" if dir =~ /^\// rm_r dir if dir?(dir) # Document. rdoc(*vector)