diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-28 22:08:56 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-28 22:08:56 +0000 |
commit | e2efe8e81dc7e9fce40b024df6a20bbf4b830350 (patch) | |
tree | 942e66e071e759c7db670a42daeac26c7437f25b /lib/rdoc/task.rb | |
parent | 90d5bcf9104fe58887cf705b718a9c7b537b51a5 (diff) | |
download | ruby-e2efe8e81dc7e9fce40b024df6a20bbf4b830350.tar.gz |
Import RDoc 3.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/task.rb')
-rw-r--r-- | lib/rdoc/task.rb | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/lib/rdoc/task.rb b/lib/rdoc/task.rb index 005c516eed..4a702e3fa8 100644 --- a/lib/rdoc/task.rb +++ b/lib/rdoc/task.rb @@ -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") # @@ -117,6 +126,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 []) attr_accessor :rdoc_files @@ -151,12 +165,28 @@ 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. def define @@ -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 |