rdoc 2.5.11 → 3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rdoc might be problematic. Click here for more details.
- data.tar.gz.sig +0 -0
- data/.document +1 -0
- data/History.txt +95 -0
- data/Manifest.txt +13 -4
- data/README.txt +9 -3
- data/Rakefile +1 -1
- data/lib/rdoc.rb +15 -298
- data/lib/rdoc/alias.rb +65 -16
- data/lib/rdoc/any_method.rb +27 -150
- data/lib/rdoc/attr.rb +36 -115
- data/lib/rdoc/class_module.rb +236 -22
- data/lib/rdoc/code_object.rb +76 -31
- data/lib/rdoc/constant.rb +32 -4
- data/lib/rdoc/context.rb +494 -222
- data/lib/rdoc/encoding.rb +79 -0
- data/lib/rdoc/erbio.rb +37 -0
- data/lib/rdoc/gauntlet.rb +9 -5
- data/lib/rdoc/generator.rb +33 -1
- data/lib/rdoc/generator/darkfish.rb +284 -375
- data/lib/rdoc/generator/markup.rb +72 -36
- data/lib/rdoc/generator/ri.rb +4 -4
- data/lib/rdoc/generator/template/darkfish/classpage.rhtml +267 -274
- data/lib/rdoc/generator/template/darkfish/filepage.rhtml +91 -91
- data/lib/rdoc/generator/template/darkfish/index.rhtml +45 -45
- data/lib/rdoc/generator/template/darkfish/rdoc.css +298 -298
- data/lib/rdoc/include.rb +40 -1
- data/lib/rdoc/known_classes.rb +1 -0
- data/lib/rdoc/markup.rb +467 -2
- data/lib/rdoc/markup/attribute_manager.rb +24 -6
- data/lib/rdoc/markup/blank_line.rb +11 -3
- data/lib/rdoc/markup/document.rb +6 -0
- data/lib/rdoc/markup/formatter.rb +10 -0
- data/lib/rdoc/markup/formatter_test_case.rb +339 -3
- data/lib/rdoc/markup/heading.rb +3 -0
- data/lib/rdoc/markup/inline.rb +11 -1
- data/lib/rdoc/markup/list.rb +3 -0
- data/lib/rdoc/markup/list_item.rb +3 -0
- data/lib/rdoc/markup/paragraph.rb +3 -0
- data/lib/rdoc/markup/parser.rb +191 -237
- data/lib/rdoc/markup/{preprocess.rb → pre_process.rb} +50 -29
- data/lib/rdoc/markup/raw.rb +4 -0
- data/lib/rdoc/markup/rule.rb +3 -0
- data/lib/rdoc/markup/text_formatter_test_case.rb +116 -0
- data/lib/rdoc/markup/to_ansi.rb +14 -2
- data/lib/rdoc/markup/to_bs.rb +8 -2
- data/lib/rdoc/markup/to_html.rb +84 -91
- data/lib/rdoc/markup/to_html_crossref.rb +77 -26
- data/lib/rdoc/markup/to_rdoc.rb +94 -49
- data/lib/rdoc/markup/to_test.rb +9 -1
- data/lib/rdoc/markup/verbatim.rb +6 -3
- data/lib/rdoc/method_attr.rb +353 -0
- data/lib/rdoc/normal_class.rb +11 -2
- data/lib/rdoc/normal_module.rb +0 -5
- data/lib/rdoc/options.rb +373 -82
- data/lib/rdoc/parser.rb +59 -23
- data/lib/rdoc/parser/c.rb +224 -86
- data/lib/rdoc/parser/ruby.rb +219 -111
- data/lib/rdoc/parser/ruby_tools.rb +4 -1
- data/lib/rdoc/parser/simple.rb +9 -4
- data/lib/rdoc/rdoc.rb +68 -28
- data/lib/rdoc/require.rb +21 -0
- data/lib/rdoc/ri/driver.rb +20 -10
- data/lib/rdoc/ri/paths.rb +2 -2
- data/lib/rdoc/ri/store.rb +22 -5
- data/lib/rdoc/ruby_lex.rb +11 -12
- data/lib/rdoc/ruby_token.rb +2 -2
- data/lib/rdoc/single_class.rb +2 -1
- data/lib/rdoc/stats.rb +202 -162
- data/lib/rdoc/stats/normal.rb +51 -0
- data/lib/rdoc/stats/quiet.rb +59 -0
- data/lib/rdoc/stats/verbose.rb +45 -0
- data/lib/rdoc/text.rb +133 -4
- data/lib/rdoc/{tokenstream.rb → token_stream.rb} +0 -2
- data/lib/rdoc/top_level.rb +230 -39
- data/test/test_attribute_manager.rb +58 -7
- data/test/test_rdoc_alias.rb +13 -0
- data/test/test_rdoc_any_method.rb +43 -2
- data/test/test_rdoc_attr.rb +15 -8
- data/test/test_rdoc_class_module.rb +133 -0
- data/test/test_rdoc_code_object.rb +62 -5
- data/test/test_rdoc_context.rb +72 -26
- data/test/test_rdoc_encoding.rb +145 -0
- data/test/test_rdoc_generator_darkfish.rb +119 -0
- data/test/test_rdoc_generator_ri.rb +22 -2
- data/test/test_rdoc_include.rb +79 -0
- data/test/test_rdoc_markup_attribute_manager.rb +4 -4
- data/test/test_rdoc_markup_parser.rb +134 -95
- data/test/test_rdoc_markup_pre_process.rb +7 -2
- data/test/test_rdoc_markup_to_ansi.rb +43 -153
- data/test/test_rdoc_markup_to_bs.rb +42 -156
- data/test/test_rdoc_markup_to_html.rb +130 -58
- data/test/test_rdoc_markup_to_html_crossref.rb +10 -10
- data/test/test_rdoc_markup_to_rdoc.rb +40 -151
- data/test/test_rdoc_method_attr.rb +122 -0
- data/test/test_rdoc_normal_class.rb +1 -1
- data/test/test_rdoc_normal_module.rb +6 -1
- data/test/test_rdoc_options.rb +237 -12
- data/test/test_rdoc_parser.rb +3 -22
- data/test/test_rdoc_parser_c.rb +203 -2
- data/test/test_rdoc_parser_ruby.rb +403 -89
- data/test/test_rdoc_parser_simple.rb +25 -1
- data/test/test_rdoc_rdoc.rb +44 -32
- data/test/test_rdoc_ri_driver.rb +29 -24
- data/test/test_rdoc_ri_store.rb +46 -3
- data/test/test_rdoc_task.rb +1 -1
- data/test/test_rdoc_text.rb +102 -8
- data/test/test_rdoc_top_level.rb +13 -4
- data/test/xref_data.rb +8 -0
- data/test/xref_test_case.rb +6 -0
- metadata +29 -19
- metadata.gz.sig +0 -0
- data/lib/rdoc/parser/perl.rb +0 -165
- data/test/test_rdoc_parser_perl.rb +0 -73
data.tar.gz.sig
CHANGED
Binary file
|
data/.document
CHANGED
data/History.txt
CHANGED
@@ -1,3 +1,98 @@
|
|
1
|
+
=== 3.0 / 2010-12-19
|
2
|
+
|
3
|
+
Special thanks to Thierry Lambert for massive improvements to RDoc.
|
4
|
+
|
5
|
+
* Major enhancements
|
6
|
+
* Ruby 1.8.6 is no longer supported by RDoc.
|
7
|
+
* RDoc now converts input files to a single encoding specified by
|
8
|
+
<tt>--encoding</tt>. See RDoc::RDoc and RDoc::Options#encoding.
|
9
|
+
<tt>--encoding</tt> is now preferred over <tt>--charset</tt>
|
10
|
+
* RDoc now supports a <tt>--coverage-report</tt> flag (also <tt>-C</tt> and
|
11
|
+
<tt>--dcov</tt>) that outputs a report on items lacking documentation.
|
12
|
+
* Templates (<tt>rdoc -T</tt>) are now checked for existence in
|
13
|
+
RDoc::Options. Generator authors can now use RDoc::Options#template_dir
|
14
|
+
which is the full path to the template directory.
|
15
|
+
* Added support for class aliases. Patch by Thierry Lambert.
|
16
|
+
* Improved merging of classes and modules across multiple files including
|
17
|
+
more accurate documentation statistics. Patch by Thierry Lambert.
|
18
|
+
* Improved handling of method aliases. Patch by Thierry Lambert.
|
19
|
+
* Improved handling of visibility of RDoc code objects. Patch by Thierry
|
20
|
+
Lambert.
|
21
|
+
* RDoc::Attr#type is now RDoc::Attr#definition. Patch by Thierry Lambert.
|
22
|
+
* Removed TimeConstantMethods
|
23
|
+
* RDoc now calls ::new instead of ::for on generators.
|
24
|
+
* Minor enhancements
|
25
|
+
* Added rdoc arguments <tt>--dry-run</tt>, <tt>--all</tt>,
|
26
|
+
<tt>--visibility</tt>, <tt>--force-output</tt>, <tt>--hyperlink-all</tt>.
|
27
|
+
Patch by Thierry Lambert.
|
28
|
+
* RDoc::Markup::FormatterTestCase has been expanded. Patch by Thierry
|
29
|
+
Lambert.
|
30
|
+
* RDoc::Markup::TextFormatterTestCase has been extracted from RDoc tests.
|
31
|
+
Patch by Thierry Lambert.
|
32
|
+
* Various RDoc::Parser::Ruby enhancements. Patch by Thierry Lambert.
|
33
|
+
* Various RDoc::Markup::Parser enhancements. Patch by Thierry Lambert.
|
34
|
+
* RDoc::Parser::binary? is more robust now that it uses Encoding.
|
35
|
+
* Deprecated rdoc arguments are now explicitly mentioned in rdoc command
|
36
|
+
output. Patch by Thierry Lambert.
|
37
|
+
* Constant values are formatted more accurately. Patch by Thierry Lambert.
|
38
|
+
* Enhanced call-seq parsing in RDoc::Parser::C. Patch by Thierry Lambert.
|
39
|
+
* RDoc no longer uses kw, cmt, re or str classes for embedded source code
|
40
|
+
snippets. Patch by Thierry Lambert.
|
41
|
+
* RDoc directives may now be escaped with a leading '\\'. Patch by Thierry
|
42
|
+
Lambert.
|
43
|
+
* RDoc note lists (<tt>label::</tt>) now generate a table with class
|
44
|
+
"rdoc-list". Patch by Thierry Lambert.
|
45
|
+
* RDoc markup documentation has been moved to RDoc::Markup including notes
|
46
|
+
on how to document source code.
|
47
|
+
* An RDoc::Require is now always listed at the file level. Patch by Thierry
|
48
|
+
Lambert.
|
49
|
+
* RDoc::CodeObjects now know which file they were defined in.
|
50
|
+
* RDoc::Options calls ::setup_options on the generator class specified by
|
51
|
+
<tt>--format</tt>. See RDoc::Options::setup_generator.
|
52
|
+
* rdoc gives an error when multiple formats are given.
|
53
|
+
* Files with erb inside will no longer trip RDoc::Parser::binary?
|
54
|
+
* Last <tt>--title</tt> wins. Patch by Thierry Lambert.
|
55
|
+
* Better block params handling. Patch by Thierry Lambert.
|
56
|
+
* Moved rdoc/tokenstream.rb to rdoc/token_stream.rb.
|
57
|
+
* Moved rdoc/markup/preprocess.rb to rdoc/markup/pre_process.rb.
|
58
|
+
* Removed "':' not followed by operator or identifier" warning for new Hash
|
59
|
+
syntax.
|
60
|
+
* rb_attr() is now supported for attributes.
|
61
|
+
* RDoc::Parser::C now supports yields, doc, and args directives like
|
62
|
+
RDoc::Parser::Ruby.
|
63
|
+
* Moved RDoc::Parser::PerlPOD to the rdoc-perl_pod gem.
|
64
|
+
* Bug fixes
|
65
|
+
* RDoc::Generator tests no longer require any installed RDoc on Ruby 1.9
|
66
|
+
* Load existing cache before generating ri. Ruby r27749 by NAKAMURA Usaku.
|
67
|
+
* RDoc now handles BOM. Ruby r28062 by Nobuyoshi Nakada.
|
68
|
+
* Use proper XML encoding for darkfish classpage. Ruby r28083 by NARUSE,
|
69
|
+
Yui.
|
70
|
+
* Fix ri output when special characters are inside html tags. Patch by Tomo
|
71
|
+
Kazahaya, Ruby Bug #3512.
|
72
|
+
* Don't bother checking if the pager exists, it's already done. Ruby r28842
|
73
|
+
by NAKAMURA Usaku.
|
74
|
+
* RDoc::Parser::Ruby now ignores non-constant-named singleton classes. Ruby
|
75
|
+
r29140 by Nobuyoshi Nakada. Ruby Bug #3759.
|
76
|
+
* RDoc::Parser::Ruby call args no longer include assignment. Ruby r29141 by
|
77
|
+
Nobuyoshi Nakada. Ruby Bug #3759
|
78
|
+
* Handle $HOME being unset in ri. Ruby r29272 by Nobuyoshi Nakada.
|
79
|
+
* uniq ancestors and modules too. Ruby r29312 by Nobuyoshi Nakada.
|
80
|
+
* RDoc now knows about Encoding by default. Ruby r29356 by Nobuyoshi
|
81
|
+
Nakada.
|
82
|
+
* ri now defaults to the backspace formatter when piped. Use RI environment
|
83
|
+
variable or options to override. Ruby r28455 by Yusuke Endoh.
|
84
|
+
* __send__ and friends no longer get their underscores removed. Patch by
|
85
|
+
Thierry Lambert.
|
86
|
+
* The C parser now makes new public when promoting initialize.
|
87
|
+
* Fix crash in #markup_code for TkUnknownChar.
|
88
|
+
* Fix crash in RDoc::Parser::C when aliasing methods with Regexp special
|
89
|
+
characters.
|
90
|
+
* Fix crash when various operators are used as a name as in
|
91
|
+
<tt>alias * compose</tt>.
|
92
|
+
* Fix warning with some dynamic use of <tt>attr_*</tt>
|
93
|
+
* Methods added to true, false and nil are now documented.
|
94
|
+
* Remove warning for methods defined on globals.
|
95
|
+
|
1
96
|
=== 2.5.11 / 2010-08-20
|
2
97
|
|
3
98
|
* Minor Enhancements
|
data/Manifest.txt
CHANGED
@@ -18,6 +18,8 @@ lib/rdoc/code_object.rb
|
|
18
18
|
lib/rdoc/code_objects.rb
|
19
19
|
lib/rdoc/constant.rb
|
20
20
|
lib/rdoc/context.rb
|
21
|
+
lib/rdoc/encoding.rb
|
22
|
+
lib/rdoc/erbio.rb
|
21
23
|
lib/rdoc/gauntlet.rb
|
22
24
|
lib/rdoc/generator.rb
|
23
25
|
lib/rdoc/generator/darkfish.rb
|
@@ -67,9 +69,10 @@ lib/rdoc/markup/list.rb
|
|
67
69
|
lib/rdoc/markup/list_item.rb
|
68
70
|
lib/rdoc/markup/paragraph.rb
|
69
71
|
lib/rdoc/markup/parser.rb
|
70
|
-
lib/rdoc/markup/
|
72
|
+
lib/rdoc/markup/pre_process.rb
|
71
73
|
lib/rdoc/markup/raw.rb
|
72
74
|
lib/rdoc/markup/rule.rb
|
75
|
+
lib/rdoc/markup/text_formatter_test_case.rb
|
73
76
|
lib/rdoc/markup/to_ansi.rb
|
74
77
|
lib/rdoc/markup/to_bs.rb
|
75
78
|
lib/rdoc/markup/to_html.rb
|
@@ -78,12 +81,12 @@ lib/rdoc/markup/to_rdoc.rb
|
|
78
81
|
lib/rdoc/markup/to_test.rb
|
79
82
|
lib/rdoc/markup/verbatim.rb
|
80
83
|
lib/rdoc/meta_method.rb
|
84
|
+
lib/rdoc/method_attr.rb
|
81
85
|
lib/rdoc/normal_class.rb
|
82
86
|
lib/rdoc/normal_module.rb
|
83
87
|
lib/rdoc/options.rb
|
84
88
|
lib/rdoc/parser.rb
|
85
89
|
lib/rdoc/parser/c.rb
|
86
|
-
lib/rdoc/parser/perl.rb
|
87
90
|
lib/rdoc/parser/ruby.rb
|
88
91
|
lib/rdoc/parser/ruby_tools.rb
|
89
92
|
lib/rdoc/parser/simple.rb
|
@@ -98,9 +101,12 @@ lib/rdoc/ruby_lex.rb
|
|
98
101
|
lib/rdoc/ruby_token.rb
|
99
102
|
lib/rdoc/single_class.rb
|
100
103
|
lib/rdoc/stats.rb
|
104
|
+
lib/rdoc/stats/normal.rb
|
105
|
+
lib/rdoc/stats/quiet.rb
|
106
|
+
lib/rdoc/stats/verbose.rb
|
101
107
|
lib/rdoc/task.rb
|
102
108
|
lib/rdoc/text.rb
|
103
|
-
lib/rdoc/
|
109
|
+
lib/rdoc/token_stream.rb
|
104
110
|
lib/rdoc/top_level.rb
|
105
111
|
test/README
|
106
112
|
test/binary.dat
|
@@ -109,12 +115,15 @@ test/test.ja.rdoc
|
|
109
115
|
test/test.ja.txt
|
110
116
|
test/test.txt
|
111
117
|
test/test_attribute_manager.rb
|
118
|
+
test/test_rdoc_alias.rb
|
112
119
|
test/test_rdoc_any_method.rb
|
113
120
|
test/test_rdoc_attr.rb
|
114
121
|
test/test_rdoc_class_module.rb
|
115
122
|
test/test_rdoc_code_object.rb
|
116
123
|
test/test_rdoc_constant.rb
|
117
124
|
test/test_rdoc_context.rb
|
125
|
+
test/test_rdoc_encoding.rb
|
126
|
+
test/test_rdoc_generator_darkfish.rb
|
118
127
|
test/test_rdoc_generator_ri.rb
|
119
128
|
test/test_rdoc_include.rb
|
120
129
|
test/test_rdoc_markup.rb
|
@@ -129,12 +138,12 @@ test/test_rdoc_markup_to_bs.rb
|
|
129
138
|
test/test_rdoc_markup_to_html.rb
|
130
139
|
test/test_rdoc_markup_to_html_crossref.rb
|
131
140
|
test/test_rdoc_markup_to_rdoc.rb
|
141
|
+
test/test_rdoc_method_attr.rb
|
132
142
|
test/test_rdoc_normal_class.rb
|
133
143
|
test/test_rdoc_normal_module.rb
|
134
144
|
test/test_rdoc_options.rb
|
135
145
|
test/test_rdoc_parser.rb
|
136
146
|
test/test_rdoc_parser_c.rb
|
137
|
-
test/test_rdoc_parser_perl.rb
|
138
147
|
test/test_rdoc_parser_ruby.rb
|
139
148
|
test/test_rdoc_parser_simple.rb
|
140
149
|
test/test_rdoc_rdoc.rb
|
data/README.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= \RDoc
|
1
|
+
= \RDoc - Ruby Documentation System
|
2
2
|
|
3
3
|
* {RDoc Project Page}[http://rubyforge.org/projects/rdoc/]
|
4
4
|
* {RDoc Documentation}[http://rdoc.rubyforge.org/]
|
@@ -25,13 +25,19 @@ See RDoc for a description of RDoc's markup and basic use.
|
|
25
25
|
== BUGS:
|
26
26
|
|
27
27
|
If you find a bug, please report it at the RDoc project's
|
28
|
-
tracker[http://rubyforge.org/tracker/?group_id=627] on RubyForge
|
28
|
+
tracker[http://rubyforge.org/tracker/?group_id=627] on RubyForge
|
29
29
|
|
30
30
|
== LICENSE:
|
31
31
|
|
32
32
|
RDoc is Copyright (c) 2001-2003 Dave Thomas, The Pragmatic Programmers.
|
33
|
-
Portions (c) 2007-
|
33
|
+
Portions (c) 2007-2010 Eric Hodel. Portions copyright others, see individual
|
34
34
|
files for details.
|
35
35
|
|
36
36
|
It is free software, and may be redistributed under the terms specified in
|
37
37
|
LICENSE.txt.
|
38
|
+
|
39
|
+
== WARRANTY:
|
40
|
+
|
41
|
+
This software is provided "as is" and without any express or implied
|
42
|
+
warranties, including, without limitation, the implied warranties of
|
43
|
+
merchantibility and fitness for a particular purpose.
|
data/Rakefile
CHANGED
@@ -13,7 +13,7 @@ Hoe.spec 'rdoc' do
|
|
13
13
|
self.remote_rdoc_dir = ''
|
14
14
|
self.testlib = :minitest
|
15
15
|
|
16
|
-
extra_dev_deps << ['minitest', '~>
|
16
|
+
extra_dev_deps << ['minitest', '~> 2']
|
17
17
|
extra_rdoc_files << 'Rakefile'
|
18
18
|
spec_extras['required_rubygems_version'] = '>= 1.3'
|
19
19
|
spec_extras['homepage'] = 'http://rdoc.rubyforge.org'
|
data/lib/rdoc.rb
CHANGED
@@ -18,14 +18,16 @@ $DEBUG_RDOC = nil
|
|
18
18
|
# == Roadmap
|
19
19
|
#
|
20
20
|
# * If you want to use RDoc to create documentation for your Ruby source files,
|
21
|
-
# read
|
21
|
+
# read the summary below, and refer to <tt>rdoc --help</tt> for command line
|
22
|
+
# usage, and RDoc::Markup for a detailed description of RDoc's markup.
|
22
23
|
# * If you want to generate documentation for extensions written in C, see
|
23
24
|
# RDoc::Parser::C
|
24
25
|
# * If you want to drive RDoc programmatically, see RDoc::RDoc.
|
25
|
-
# * If you want to use the library to format text blocks into HTML,
|
26
|
-
#
|
27
|
-
# * If you want to
|
28
|
-
# RDoc::
|
26
|
+
# * If you want to use the library to format text blocks into HTML, look at
|
27
|
+
# RDoc::Markup.
|
28
|
+
# * If you want to make an RDoc plugin such as a generator or directive
|
29
|
+
# handler see RDoc::RDoc.
|
30
|
+
# * If you want to try writing your own output generator see RDoc::Generator.
|
29
31
|
#
|
30
32
|
# == Summary
|
31
33
|
#
|
@@ -50,7 +52,7 @@ $DEBUG_RDOC = nil
|
|
50
52
|
# index page contain the documentation for the primary file. In our
|
51
53
|
# case, we could type
|
52
54
|
#
|
53
|
-
# % rdoc --main
|
55
|
+
# % rdoc --main README.txt
|
54
56
|
#
|
55
57
|
# You'll find information on the various formatting tricks you can use
|
56
58
|
# in comment blocks in the documentation this generates.
|
@@ -62,281 +64,9 @@ $DEBUG_RDOC = nil
|
|
62
64
|
# markers). If directory names are passed to RDoc, they are scanned
|
63
65
|
# recursively for C and Ruby source files only.
|
64
66
|
#
|
65
|
-
# == \Options
|
66
|
-
#
|
67
|
-
# rdoc can be passed a variety of command-line options. In addition,
|
68
|
-
# options can be specified via the +RDOCOPT+ environment variable, which
|
69
|
-
# functions similarly to the +RUBYOPT+ environment variable.
|
70
|
-
#
|
71
|
-
# % export RDOCOPT="-S"
|
72
|
-
#
|
73
|
-
# will make rdoc default to inline method source code. Command-line options
|
74
|
-
# always will override those in +RDOCOPT+.
|
75
|
-
#
|
76
|
-
# Run:
|
77
|
-
#
|
78
|
-
# rdoc --help
|
79
|
-
#
|
80
|
-
# for full details on rdoc's options.
|
81
|
-
#
|
82
|
-
# == Documenting Source Code
|
83
|
-
#
|
84
|
-
# Comment blocks can be written fairly naturally, either using <tt>#</tt> on
|
85
|
-
# successive lines of the comment, or by including the comment in
|
86
|
-
# a =begin/=end block. If you use the latter form, the =begin line must be
|
87
|
-
# flagged with an RDoc tag:
|
88
|
-
#
|
89
|
-
# =begin rdoc
|
90
|
-
# Documentation to be processed by RDoc.
|
91
|
-
#
|
92
|
-
# ...
|
93
|
-
# =end
|
94
|
-
#
|
95
|
-
# RDoc stops processing comments if it finds a comment line containing
|
96
|
-
# a <tt>--</tt>. This can be used to separate external from internal
|
97
|
-
# comments, or to stop a comment being associated with a method, class, or
|
98
|
-
# module. Commenting can be turned back on with a line that starts with a
|
99
|
-
# <tt>++</tt>.
|
100
|
-
#
|
101
|
-
# ##
|
102
|
-
# # Extract the age and calculate the date-of-birth.
|
103
|
-
# #--
|
104
|
-
# # FIXME: fails if the birthday falls on February 29th
|
105
|
-
# #++
|
106
|
-
# # The DOB is returned as a Time object.
|
107
|
-
#
|
108
|
-
# def get_dob(person)
|
109
|
-
# # ...
|
110
|
-
# end
|
111
|
-
#
|
112
|
-
# Names of classes, files, and any method names containing an
|
113
|
-
# underscore or preceded by a hash character are automatically hyperlinked
|
114
|
-
# from comment text to their description.
|
115
|
-
#
|
116
|
-
# Method parameter lists are extracted and displayed with the method
|
117
|
-
# description. If a method calls +yield+, then the parameters passed to yield
|
118
|
-
# will also be displayed:
|
119
|
-
#
|
120
|
-
# def fred
|
121
|
-
# ...
|
122
|
-
# yield line, address
|
123
|
-
#
|
124
|
-
# This will get documented as:
|
125
|
-
#
|
126
|
-
# fred() { |line, address| ... }
|
127
|
-
#
|
128
|
-
# You can override this using a comment containing ':yields: ...' immediately
|
129
|
-
# after the method definition
|
130
|
-
#
|
131
|
-
# def fred # :yields: index, position
|
132
|
-
# # ...
|
133
|
-
#
|
134
|
-
# yield line, address
|
135
|
-
#
|
136
|
-
# which will get documented as
|
137
|
-
#
|
138
|
-
# fred() { |index, position| ... }
|
139
|
-
#
|
140
|
-
# +:yields:+ is an example of a documentation directive. These appear
|
141
|
-
# immediately after the start of the document element they are modifying.
|
142
|
-
#
|
143
|
-
# RDoc automatically cross-references words with underscores or camel-case.
|
144
|
-
# To suppress cross-references, prefix the word with a \\ character. To
|
145
|
-
# include special characters like "\\n", you'll need to use two \\
|
146
|
-
# characters like "\\\\\\n".
|
147
|
-
#
|
148
|
-
# == \Markup
|
149
|
-
#
|
150
|
-
# * The markup engine looks for a document's natural left margin. This is
|
151
|
-
# used as the initial margin for the document.
|
152
|
-
#
|
153
|
-
# * Consecutive lines starting at this margin are considered to be a
|
154
|
-
# paragraph.
|
155
|
-
#
|
156
|
-
# * If a paragraph starts with a "*", "-", or with "<digit>.", then it is
|
157
|
-
# taken to be the start of a list. The margin in increased to be the first
|
158
|
-
# non-space following the list start flag. Subsequent lines should be
|
159
|
-
# indented to this new margin until the list ends. For example:
|
160
|
-
#
|
161
|
-
# * this is a list with three paragraphs in
|
162
|
-
# the first item. This is the first paragraph.
|
163
|
-
#
|
164
|
-
# And this is the second paragraph.
|
165
|
-
#
|
166
|
-
# 1. This is an indented, numbered list.
|
167
|
-
# 2. This is the second item in that list
|
168
|
-
#
|
169
|
-
# This is the third conventional paragraph in the
|
170
|
-
# first list item.
|
171
|
-
#
|
172
|
-
# * This is the second item in the original list
|
173
|
-
#
|
174
|
-
# * You can also construct labeled lists, sometimes called description
|
175
|
-
# or definition lists. Do this by putting the label in square brackets
|
176
|
-
# and indenting the list body:
|
177
|
-
#
|
178
|
-
# [cat] a small furry mammal
|
179
|
-
# that seems to sleep a lot
|
180
|
-
#
|
181
|
-
# [ant] a little insect that is known
|
182
|
-
# to enjoy picnics
|
183
|
-
#
|
184
|
-
# A minor variation on labeled lists uses two colons to separate the
|
185
|
-
# label from the list body:
|
186
|
-
#
|
187
|
-
# cat:: a small furry mammal
|
188
|
-
# that seems to sleep a lot
|
189
|
-
#
|
190
|
-
# ant:: a little insect that is known
|
191
|
-
# to enjoy picnics
|
192
|
-
#
|
193
|
-
# This latter style guarantees that the list bodies' left margins are
|
194
|
-
# aligned: think of them as a two column table.
|
195
|
-
#
|
196
|
-
# * Any line that starts to the right of the current margin is treated
|
197
|
-
# as verbatim text. This is useful for code listings. The example of a
|
198
|
-
# list above is also verbatim text.
|
199
|
-
#
|
200
|
-
# * A line starting with an equals sign (=) is treated as a
|
201
|
-
# heading. Level one headings have one equals sign, level two headings
|
202
|
-
# have two,and so on.
|
203
|
-
#
|
204
|
-
# * A line starting with three or more hyphens (at the current indent)
|
205
|
-
# generates a horizontal rule. The more hyphens, the thicker the rule
|
206
|
-
# (within reason, and if supported by the output device)
|
207
|
-
#
|
208
|
-
# * You can use markup within text (except verbatim) to change the
|
209
|
-
# appearance of parts of that text. Out of the box, RDoc::Markup
|
210
|
-
# supports word-based and general markup.
|
211
|
-
#
|
212
|
-
# Word-based markup uses flag characters around individual words:
|
213
|
-
#
|
214
|
-
# [<tt>\*word*</tt>] displays word in a *bold* font
|
215
|
-
# [<tt>\_word_</tt>] displays word in an _emphasized_ font
|
216
|
-
# [<tt>\+word+</tt>] displays word in a +code+ font
|
217
|
-
#
|
218
|
-
# General markup affects text between a start delimiter and and end
|
219
|
-
# delimiter. Not surprisingly, these delimiters look like HTML markup.
|
220
|
-
#
|
221
|
-
# [<tt>\<b>text...</b></tt>] displays word in a *bold* font
|
222
|
-
# [<tt>\<em>text...</em></tt>] displays word in an _emphasized_ font
|
223
|
-
# [<tt>\<i>text...</i></tt>] displays word in an <i>italicized</i> font
|
224
|
-
# [<tt>\<tt>text...\</tt></tt>] displays word in a +code+ font
|
225
|
-
#
|
226
|
-
# Unlike conventional Wiki markup, general markup can cross line
|
227
|
-
# boundaries. You can turn off the interpretation of markup by
|
228
|
-
# preceding the first character with a backslash. This only works for
|
229
|
-
# simple markup, not HTML-style markup.
|
230
|
-
#
|
231
|
-
# * Hyperlinks to the web starting http:, mailto:, ftp:, or www. are
|
232
|
-
# recognized. An HTTP url that references an external image file is
|
233
|
-
# converted into an inline \<IMG..>. Hyperlinks starting 'link:' are
|
234
|
-
# assumed to refer to local files whose path is relative to the --op
|
235
|
-
# directory.
|
236
|
-
#
|
237
|
-
# Hyperlinks can also be of the form <tt>label</tt>[url], in which
|
238
|
-
# case the label is used in the displayed text, and +url+ is
|
239
|
-
# used as the target. If +label+ contains multiple words,
|
240
|
-
# put it in braces: <em>{multi word label}[</em>url<em>]</em>.
|
241
|
-
#
|
242
|
-
# Example hyperlinks:
|
243
|
-
#
|
244
|
-
# link:RDoc.html
|
245
|
-
# http://rdoc.rubyforge.org
|
246
|
-
# mailto:user@example.com
|
247
|
-
# {RDoc Documentation}[http://rdoc.rubyforge.org]
|
248
|
-
# {RDoc Markup}[link:RDoc/Markup.html]
|
249
|
-
#
|
250
|
-
# == Directives
|
251
|
-
#
|
252
|
-
# [+:nodoc:+ / +:nodoc:+ all]
|
253
|
-
# This directive prevents documentation for the element from
|
254
|
-
# being generated. For classes and modules, the methods, aliases,
|
255
|
-
# constants, and attributes directly within the affected class or
|
256
|
-
# module also will be omitted. By default, though, modules and
|
257
|
-
# classes within that class of module _will_ be documented. This is
|
258
|
-
# turned off by adding the +all+ modifier.
|
259
|
-
#
|
260
|
-
# module MyModule # :nodoc:
|
261
|
-
# class Input
|
262
|
-
# end
|
263
|
-
# end
|
264
|
-
#
|
265
|
-
# module OtherModule # :nodoc: all
|
266
|
-
# class Output
|
267
|
-
# end
|
268
|
-
# end
|
269
|
-
#
|
270
|
-
# In the above code, only class <tt>MyModule::Input</tt> will be documented.
|
271
|
-
# The +:nodoc:+ directive is global across all files for the class or module
|
272
|
-
# to which it applies, so use +:stopdoc:+/+:startdoc:+ to suppress
|
273
|
-
# documentation only for a particular set of methods, etc.
|
274
|
-
#
|
275
|
-
# [+:doc:+]
|
276
|
-
# Forces a method or attribute to be documented even if it wouldn't be
|
277
|
-
# otherwise. Useful if, for example, you want to include documentation of a
|
278
|
-
# particular private method.
|
279
|
-
#
|
280
|
-
# [+:notnew:+]
|
281
|
-
# Only applicable to the +initialize+ instance method. Normally RDoc
|
282
|
-
# assumes that the documentation and parameters for +initialize+ are
|
283
|
-
# actually for the +new+ method, and so fakes out a +new+ for the class.
|
284
|
-
# The +:notnew:+ modifier stops this. Remember that +initialize+ is private,
|
285
|
-
# so you won't see the documentation unless you use the +-a+ command line
|
286
|
-
# option.
|
287
|
-
#
|
288
|
-
# Comment blocks can contain other directives:
|
289
|
-
#
|
290
|
-
# [<tt>:section: title</tt>]
|
291
|
-
# Starts a new section in the output. The title following +:section:+ is
|
292
|
-
# used as the section heading, and the remainder of the comment containing
|
293
|
-
# the section is used as introductory text. Subsequent methods, aliases,
|
294
|
-
# attributes, and classes will be documented in this section. A :section:
|
295
|
-
# comment block may have one or more lines before the :section: directive.
|
296
|
-
# These will be removed, and any identical lines at the end of the block are
|
297
|
-
# also removed. This allows you to add visual cues such as:
|
298
|
-
#
|
299
|
-
# # ----------------------------------------
|
300
|
-
# # :section: My Section
|
301
|
-
# # This is the section that I wrote.
|
302
|
-
# # See it glisten in the noon-day sun.
|
303
|
-
# # ----------------------------------------
|
304
|
-
#
|
305
|
-
# [+:call-seq:+]
|
306
|
-
# Lines up to the next blank line in the comment are treated as the method's
|
307
|
-
# calling sequence, overriding the default parsing of method parameters and
|
308
|
-
# yield arguments.
|
309
|
-
#
|
310
|
-
# [+:include:+ _filename_]
|
311
|
-
# \Include the contents of the named file at this point. The file will be
|
312
|
-
# searched for in the directories listed by the +--include+ option, or in
|
313
|
-
# the current directory by default. The contents of the file will be
|
314
|
-
# shifted to have the same indentation as the ':' at the start of
|
315
|
-
# the :include: directive.
|
316
|
-
#
|
317
|
-
# [+:title:+ _text_]
|
318
|
-
# Sets the title for the document. Equivalent to the <tt>--title</tt>
|
319
|
-
# command line parameter. (The command line parameter overrides any :title:
|
320
|
-
# directive in the source).
|
321
|
-
#
|
322
|
-
# [+:enddoc:+]
|
323
|
-
# Document nothing further at the current level.
|
324
|
-
#
|
325
|
-
# [+:main:+ _name_]
|
326
|
-
# Equivalent to the <tt>--main</tt> command line parameter.
|
327
|
-
#
|
328
|
-
# [+:stopdoc:+ / +:startdoc:+]
|
329
|
-
# Stop and start adding new documentation elements to the current container.
|
330
|
-
# For example, if a class has a number of constants that you don't want to
|
331
|
-
# document, put a +:stopdoc:+ before the first, and a +:startdoc:+ after the
|
332
|
-
# last. If you don't specify a +:startdoc:+ by the end of the container,
|
333
|
-
# disables documentation for the entire class or module.
|
334
|
-
#
|
335
|
-
# Further directives can be found in RDoc::Parser::Ruby and RDoc::Parser::C
|
336
|
-
#
|
337
67
|
# == Other stuff
|
338
68
|
#
|
339
|
-
# RDoc is currently being maintained by Eric Hodel <drbrain@segment7.net
|
69
|
+
# RDoc is currently being maintained by Eric Hodel <drbrain@segment7.net>.
|
340
70
|
#
|
341
71
|
# Dave Thomas <dave@pragmaticprogrammer.com> is the original author of RDoc.
|
342
72
|
#
|
@@ -345,24 +75,6 @@ $DEBUG_RDOC = nil
|
|
345
75
|
# * The Ruby parser in rdoc/parse.rb is based heavily on the outstanding
|
346
76
|
# work of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby
|
347
77
|
# parser for irb and the rtags package.
|
348
|
-
#
|
349
|
-
# * Charset patch from MoonWolf.
|
350
|
-
#
|
351
|
-
# * Rich Kilmer wrote the kilmer.rb output template.
|
352
|
-
#
|
353
|
-
# * Dan Brickley led the design of the RDF format.
|
354
|
-
#
|
355
|
-
# == License
|
356
|
-
#
|
357
|
-
# RDoc is Copyright (c) 2001-2003 Dave Thomas, The Pragmatic Programmers. It
|
358
|
-
# is free software, and may be redistributed under the terms specified
|
359
|
-
# in the README file of the Ruby distribution.
|
360
|
-
#
|
361
|
-
# == Warranty
|
362
|
-
#
|
363
|
-
# This software is provided "as is" and without any express or implied
|
364
|
-
# warranties, including, without limitation, the implied warranties of
|
365
|
-
# merchantibility and fitness for a particular purpose.
|
366
78
|
|
367
79
|
module RDoc
|
368
80
|
|
@@ -383,7 +95,12 @@ module RDoc
|
|
383
95
|
##
|
384
96
|
# RDoc version you are using
|
385
97
|
|
386
|
-
VERSION = '
|
98
|
+
VERSION = '3.0'
|
99
|
+
|
100
|
+
##
|
101
|
+
# Method visibilities
|
102
|
+
|
103
|
+
VISIBILITIES = [:public, :protected, :private]
|
387
104
|
|
388
105
|
##
|
389
106
|
# Name of the dotfile that contains the description of files to be processed
|