[Rake-devel] PATCH: rdoctask.rb improved comments
Gavin Sinclair
gsinclair at soyabean.com.au
Thu Dec 4 20:20:45 EST 2003
This patch improves, and in some cases corrects, the RDoc comments in
rdoctask.rb.
Gavin
Index: lib/rake/rdoctask.rb
===================================================================
RCS file: /var/cvs/rake/rake/lib/rake/rdoctask.rb,v
retrieving revision 1.8
diff -u -u -r1.8 rdoctask.rb
--- lib/rake/rdoctask.rb 28 Nov 2003 04:15:02 -0000 1.8
+++ lib/rake/rdoctask.rb 4 Dec 2003 09:19:36 -0000
@@ -10,14 +10,14 @@
#
# The PackageTask will create the following targets:
#
- # [<b><em>name</em></b>]
+ # [<b>:<em>rdoc</em></b>]
# Main task for this RDOC task.
#
- # [<b>:clobber_<em>name</em></b>]
+ # [<b>:clobber_<em>rdoc</em></b>]
# Delete all the package files. This target is automatically
# added to the main clobber target.
#
- # [<b>:re<em>name</em></b>]
+ # [<b>:re<em>rdoc</em></b>]
# Rebuild the package files from scratch, even if they are not out
# of date.
#
@@ -25,9 +25,22 @@
#
# RDocTask.new do |rd|
# rd.main = "README.rdoc"
- # rd.package_files.include("lib/**/*.rb")
+ # rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
# end
#
+ # 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:
+ #
+ # 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 :<em>rdoc_dev</em>, :clobber_<em>rdoc_dev</em>, and
+ # :re<em>rdoc_dev</em>.
+ #
class RDocTask < TaskLib
# Name of the main, top level task. (default is :rdoc)
attr_accessor :name
@@ -52,7 +65,7 @@
attr_accessor :options
# Create an RDoc task named <em>name</em>.
- def initialize(name=:rdoc)
+ def initialize(name=:rdoc) # :yield: self
@name = name
@rdoc_files = Rake::FileList.new
@rdoc_dir = 'html'
More information about the Rake-devel
mailing list