1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/rdoc/ri/task.rb
hsbt ba6ae341ba * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta2
Fixed ri parse defect with left-hand matched classes.
  https://github.com/rdoc/rdoc/pull/420

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-07 22:23:38 +00:00

71 lines
1.3 KiB
Ruby

# frozen_string_literal: false
begin
gem 'rdoc'
rescue Gem::LoadError
end unless defined?(RDoc)
require 'rdoc/task'
##
# RDoc::RI::Task creates ri data in <code>./.rdoc</code> for your project.
#
# It contains the following tasks:
#
# [ri]
# Build ri data
#
# [clobber_ri]
# Delete ri data files. This target is automatically added to the main
# clobber target.
#
# [reri]
# Rebuild the ri data from scratch even if they are not out of date.
#
# Simple example:
#
# require 'rdoc/ri/task'
#
# RDoc::RI::Task.new do |ri|
# ri.main = 'README.rdoc'
# ri.rdoc_files.include 'README.rdoc', 'lib/**/*.rb'
# end
#
# For further configuration details see RDoc::Task.
class RDoc::RI::Task < RDoc::Task
DEFAULT_NAMES = { # :nodoc:
:clobber_rdoc => :clobber_ri,
:rdoc => :ri,
:rerdoc => :reri,
}
##
# Create an ri task with the given name. See RDoc::Task for documentation on
# setting names.
def initialize name = DEFAULT_NAMES # :yield: self
super
end
def clobber_task_description # :nodoc:
"Remove RI data files"
end
##
# Sets default task values
def defaults
super
@rdoc_dir = '.rdoc'
end
def rdoc_task_description # :nodoc:
'Build RI data files'
end
def rerdoc_task_description # :nodoc:
'Rebuild RI data files'
end
end