Sha256: a618151c1ebda6e55dce85492788cb66ccf867e763eb495b8a203b13437763e1

Contents?: true

Size: 842 Bytes

Versions: 2

Compression:

Stored size: 842 Bytes

Contents

#!/usr/bin/env ratch

# generate rdocs
#
# Generate Rdoc documentation. Settings are
# the same as the rdoc command's options.

main :rdoc do
  # Load rdoc configuration.

  config = configuration['rdoc']

  config['op'] = config.delete('output') if config['output']

  config = {
    'template'       => 'html',
    'op'             => 'doc/rdoc',
    'merge'          => true,
    'inline-source'  => true,
    'exclude'        => %w{MANIFEST, Manifest.txt},
    'include'        => %w{[A-Z]* lib ext}
  }.update(config)

  output = config['op']

  # Check for parent directory.
  # (Helps to ensure we're in the right place.)

  dir!(File.dirname(output))

  # Prepare command arguments.

  vector = config.command_vector('include')

  # Remove old rdocs, if any.

  rm_r(output) if File.exist?(output)

  # Document.

  rdoc(*vector)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tmail-1.1.1 bat/rdoc
tmail-1.2.1 script/rdoc