mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import RDoc 3.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
90d5bcf910
commit
e2efe8e81d
28 changed files with 494 additions and 56 deletions
|
@ -53,6 +53,9 @@ require 'rake/tasklib'
|
|||
#
|
||||
# Simple Example:
|
||||
#
|
||||
# gem 'rdoc'
|
||||
# require 'rdoc/task'
|
||||
#
|
||||
# RDoc::Task.new do |rd|
|
||||
# rd.main = "README.rdoc"
|
||||
# rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
|
||||
|
@ -67,6 +70,9 @@ require 'rake/tasklib'
|
|||
# generating two sets of documentation. For instance, if you want to have a
|
||||
# development set of documentation including private methods:
|
||||
#
|
||||
# gem 'rdoc'
|
||||
# require 'rdoc/task'
|
||||
#
|
||||
# RDoc::Task.new :rdoc_dev do |rd|
|
||||
# rd.main = "README.doc"
|
||||
# rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
|
||||
|
@ -82,6 +88,9 @@ require 'rake/tasklib'
|
|||
#
|
||||
# For example:
|
||||
#
|
||||
# gem 'rdoc'
|
||||
# require 'rdoc/task'
|
||||
#
|
||||
# RDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean",
|
||||
# :rerdoc => "rdoc:force")
|
||||
#
|
||||
|
@ -116,6 +125,11 @@ class RDoc::Task < Rake::TaskLib
|
|||
|
||||
attr_accessor :template
|
||||
|
||||
##
|
||||
# Name of format generator (--fmt) used by rdoc. (defaults to rdoc's default)
|
||||
|
||||
attr_accessor :generator
|
||||
|
||||
##
|
||||
# List of files to be included in the rdoc generation. (default is [])
|
||||
|
||||
|
@ -151,11 +165,27 @@ class RDoc::Task < Rake::TaskLib
|
|||
@main = nil
|
||||
@title = nil
|
||||
@template = nil
|
||||
@generator = nil
|
||||
@options = []
|
||||
yield self if block_given?
|
||||
define
|
||||
end
|
||||
|
||||
##
|
||||
# All source is inline now. This method is deprecated
|
||||
|
||||
def inline_source() # :nodoc:
|
||||
warn "RDoc::Task#inline_source is deprecated"
|
||||
true
|
||||
end
|
||||
|
||||
##
|
||||
# All source is inline now. This method is deprecated
|
||||
|
||||
def inline_source=(value) # :nodoc:
|
||||
warn "RDoc::Task#inline_source is deprecated"
|
||||
end
|
||||
|
||||
##
|
||||
# Create the tasks defined by this task lib.
|
||||
|
||||
|
@ -201,9 +231,10 @@ class RDoc::Task < Rake::TaskLib
|
|||
def option_list
|
||||
result = @options.dup
|
||||
result << "-o" << @rdoc_dir
|
||||
result << "--main" << main if main
|
||||
result << "--title" << title if title
|
||||
result << "-T" << template if template
|
||||
result << "--main" << main if main
|
||||
result << "--title" << title if title
|
||||
result << "-T" << template if template
|
||||
result << '-f' << generator if generator
|
||||
result
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue