Type:
Class

RDoc::Task creates the following rake tasks to generate and clean up RDoc output:

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:

1
2
3
4
5
6
require 'rdoc/task'
 
RDoc::Task.new do |rdoc|
  rdoc.main = "README.rdoc"
  rdoc.rdoc_files.include("README.rdoc", "lib   /*.rb")
end

The rdoc object passed to the block is an RDoc::Task object. See the attributes list for the RDoc::Task 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:

1
2
3
4
5
6
7
require 'rdoc/task'
 
RDoc::Task.new :rdoc_dev do |rdoc|
  rdoc.main = "README.doc"
  rdoc.rdoc_files.include("README.rdoc", "lib/   *.rb")
  rdoc.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:

1
2
3
4
require 'rdoc/task'
 
RDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean",
               :rerdoc => "rdoc:force")

This will create the tasks :rdoc, :rdoc:clean and :rdoc:force.

check_names
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Task

check_names(names) Instance Public methods Ensures that names only

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Task

new(name = :rdoc) Class Public methods Create an

2025-01-10 15:47:30
before_running_rdoc
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Task

before_running_rdoc(&block) Instance Public methods The block passed to

2025-01-10 15:47:30
rerdoc_task_description
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Task

rerdoc_task_description() Instance Public methods

2025-01-10 15:47:30
rdoc_task_description
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Task

rdoc_task_description() Instance Public methods

2025-01-10 15:47:30
define
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Task

define() Instance Public methods Create the tasks defined by this task lib.

2025-01-10 15:47:30
option_list
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Task

option_list() Instance Public methods List of options that will be supplied

2025-01-10 15:47:30
defaults
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Task

defaults() Instance Public methods Sets default task values

2025-01-10 15:47:30
clobber_task_description
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Task

clobber_task_description() Instance Public methods

2025-01-10 15:47:30