Class | Rake::RDocTask
In: | lib/rake/rdoctask.rb
Parent: | TaskLib

Create a documentation task that will generate the RDoc files for a project.

The RDocTask will create the following targets:

rdoc
  Main task for this RDOC task.
:clobber_rdoc
  Delete all the rdoc files. This target is automatically added to the main clobber target.
:rerdoc
  Rebuild the rdoc files from scratch, even if they are not out of date.

Simple Example:

      Rake::RDocTask.new do |rd|
        rd.main = "README.rdoc"
        rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
      end

The `rd` object passed to the block is an RDocTask object. See the attributes list for the RDocTask class for available customization options.

## Specifying different task names

You may wish to give the task a different name, such as if you are generating two sets of documentation. For instance, if you want to have a development set of documentation including private methods:

      Rake::RDocTask.new(:rdoc_dev) do |rd|
        rd.main = "README.doc"
        rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
        rd.options << "--all"
      end

The tasks would then be named :rdoc_dev, :clobber_rdoc_dev, and :rerdoc_dev.

If you wish to have completely different task names, then pass a Hash as first argument. With the `:rdoc`, `:clobber_rdoc` and `:rerdoc` options, you can customize the task names to your liking. For example:

      Rake::RDocTask.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", :rerdoc => "rdoc:force")

This will create the tasks `:rdoc`, `:rdoc_clean` and `:rdoc:force`.

### Methods

before_running_rdoc define new option_list option_string quote

### Attributes

external | [RW] | Whether to run the rdoc process as an external shell (default is false)
inline_source | [RW] |
main | [RW] | Name of file to be used as the main, top level file of the RDoc. (default is none)
name | [RW] | Name of the main, top level task. (default is :rdoc)
options | [RW] | Additional list of options to be passed rdoc. (default is [])
rdoc_dir | [RW] | Name of directory to receive the html output files. (default is "html")
rdoc_files | [RW] | List of files to be included in the rdoc generation. (default is [])
template | [RW] | Name of template to be used by rdoc. (defaults to rdoc‘s default)
title | [RW] | Title of RDoc documentation. (defaults to rdoc‘s default)

### Public Class methods

new(name = :rdoc) {|self| ...}

Create an RDoc task with the given name. See the RDocTask class overview for documentation.

### Public Instance methods

before_running_rdoc(&block)

The block passed to this method will be called just before running the RDoc generator. It is allowed to modify RDocTask attributes inside the block.

define()

Create the tasks defined by this task lib.

option_list()
option_string()
quote(str)

[Validate]