File tree Expand file tree Collapse file tree 1 file changed +51
-6
lines changed Expand file tree Collapse file tree 1 file changed +51
-6
lines changed Original file line number Diff line number Diff line change 66
77require 'rdoc/task'
88
9+ ##
10+ # RDoc::RI::Task creates ri data in <code>./.rdoc</code> for your project.
11+ #
12+ # It contains the following tasks:
13+ #
14+ # [ri]
15+ # Build ri data
16+ #
17+ # [clobber_ri]
18+ # Delete ri data files. This target is automatically added to the main
19+ # clobber target.
20+ #
21+ # [reri]
22+ # Rebuild the ri data from scratch even if they are not out of date.
23+ #
24+ # Simple example:
25+ #
26+ # require 'rdoc/ri/task'
27+ #
28+ # RDoc::RI::Task.new do |ri|
29+ # ri.main = 'README.rdoc'
30+ # ri.rdoc_files.include 'README.rdoc', 'lib/**/*.rb'
31+ # end
32+ #
33+ # For further configuration details see RDoc::Task.
34+
935class RDoc ::RI ::Task < RDoc ::Task
10- def clobber_task_description
11- "Remove RDoc RI data files"
36+
37+ DEFAULT_NAMES = { # :nodoc:
38+ :clobber_rdoc => :clobber_ri ,
39+ :rdoc => :ri ,
40+ :rerdoc => :reri ,
41+ }
42+
43+ ##
44+ # Create an ri task with the given name. See RDoc::Task for documentation on
45+ # setting names.
46+
47+ def initialize name = DEFAULT_NAMES # :yield: self
48+ super
1249 end
1350
51+ def clobber_task_description # :nodoc:
52+ "Remove RI data files"
53+ end
54+
55+ ##
56+ # Sets default task values
57+
1458 def defaults
1559 super
60+
1661 @rdoc_dir = '.rdoc'
1762 end
1863
19- def rdoc_task_description
20- 'Build RDoc RI data files'
64+ def rdoc_task_description # :nodoc:
65+ 'Build RI data files'
2166 end
2267
23- def rerdoc_task_description
24- 'Rebuild RDoc RI data files'
68+ def rerdoc_task_description # :nodoc:
69+ 'Rebuild RI data files'
2570 end
2671end
You can’t perform that action at this time.
0 commit comments