rdoc 6.7.0 → 6.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ExampleMarkdown.md +2 -0
- data/ExampleRDoc.rdoc +2 -0
- data/History.rdoc +64 -62
- data/LICENSE.rdoc +2 -0
- data/README.rdoc +13 -0
- data/RI.md +842 -0
- data/TODO.rdoc +8 -7
- data/lib/rdoc/{alias.rb → code_object/alias.rb} +1 -1
- data/lib/rdoc/{class_module.rb → code_object/class_module.rb} +54 -0
- data/lib/rdoc/{method_attr.rb → code_object/method_attr.rb} +3 -3
- data/lib/rdoc/{top_level.rb → code_object/top_level.rb} +4 -4
- data/lib/rdoc/code_object.rb +6 -0
- data/lib/rdoc/generator/darkfish.rb +45 -3
- data/lib/rdoc/generator/pot/message_extractor.rb +1 -1
- data/lib/rdoc/generator/pot/po_entry.rb +1 -1
- data/lib/rdoc/generator/template/darkfish/_head.rhtml +23 -0
- data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +20 -11
- data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +3 -8
- data/lib/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +3 -0
- data/lib/rdoc/generator/template/darkfish/class.rhtml +69 -43
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +367 -392
- data/lib/rdoc/generator/template/darkfish/index.rhtml +7 -6
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +18 -1
- data/lib/rdoc/generator/template/darkfish/page.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +10 -8
- data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +5 -2
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +11 -0
- data/lib/rdoc/markdown.kpeg +1 -1
- data/lib/rdoc/markdown.rb +21 -11
- data/lib/rdoc/markup/attribute_manager.rb +2 -2
- data/lib/rdoc/markup/pre_process.rb +9 -6
- data/lib/rdoc/markup/to_bs.rb +1 -1
- data/lib/rdoc/markup/to_rdoc.rb +4 -4
- data/lib/rdoc/markup.rb +18 -13
- data/lib/rdoc/options.rb +22 -5
- data/lib/rdoc/parser/c.rb +1 -1
- data/lib/rdoc/parser/changelog.rb +2 -2
- data/lib/rdoc/parser/ripper_state_lex.rb +7 -305
- data/lib/rdoc/parser/ruby.rb +15 -6
- data/lib/rdoc/parser.rb +2 -1
- data/lib/rdoc/rdoc.rb +3 -2
- data/lib/rdoc/ri/driver.rb +10 -6
- data/lib/rdoc/task.rb +2 -3
- data/lib/rdoc/tom_doc.rb +1 -7
- data/lib/rdoc/version.rb +1 -1
- data/lib/rdoc.rb +22 -22
- metadata +28 -24
- data/RI.rdoc +0 -57
- /data/lib/rdoc/{anon_class.rb → code_object/anon_class.rb} +0 -0
- /data/lib/rdoc/{any_method.rb → code_object/any_method.rb} +0 -0
- /data/lib/rdoc/{attr.rb → code_object/attr.rb} +0 -0
- /data/lib/rdoc/{constant.rb → code_object/constant.rb} +0 -0
- /data/lib/rdoc/{context → code_object/context}/section.rb +0 -0
- /data/lib/rdoc/{context.rb → code_object/context.rb} +0 -0
- /data/lib/rdoc/{extend.rb → code_object/extend.rb} +0 -0
- /data/lib/rdoc/{ghost_method.rb → code_object/ghost_method.rb} +0 -0
- /data/lib/rdoc/{include.rb → code_object/include.rb} +0 -0
- /data/lib/rdoc/{meta_method.rb → code_object/meta_method.rb} +0 -0
- /data/lib/rdoc/{mixin.rb → code_object/mixin.rb} +0 -0
- /data/lib/rdoc/{normal_class.rb → code_object/normal_class.rb} +0 -0
- /data/lib/rdoc/{normal_module.rb → code_object/normal_module.rb} +0 -0
- /data/lib/rdoc/{require.rb → code_object/require.rb} +0 -0
- /data/lib/rdoc/{single_class.rb → code_object/single_class.rb} +0 -0
@@ -1,15 +1,16 @@
|
|
1
1
|
<body id="top" role="document" class="file">
|
2
|
-
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
3
|
+
|
4
|
+
<nav id="navigation" role="navigation">
|
3
5
|
<div id="project-navigation">
|
4
6
|
<%= render '_sidebar_navigation.rhtml' %>
|
5
|
-
|
6
7
|
<%= render '_sidebar_search.rhtml' %>
|
7
8
|
</div>
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
<%= render '_sidebar_pages.rhtml' %>
|
11
|
+
<%= render '_sidebar_classes.rhtml' %>
|
12
|
+
|
13
|
+
<%= render '_footer.rhtml' %>
|
13
14
|
</nav>
|
14
15
|
|
15
16
|
<main role="main">
|
@@ -34,7 +34,7 @@ function showSource( e ) {
|
|
34
34
|
};
|
35
35
|
|
36
36
|
function hookSourceViews() {
|
37
|
-
document.querySelectorAll('.method-
|
37
|
+
document.querySelectorAll('.method-source-toggle').forEach(function (codeObject) {
|
38
38
|
codeObject.addEventListener('click', showSource);
|
39
39
|
});
|
40
40
|
};
|
@@ -90,8 +90,25 @@ function hookFocus() {
|
|
90
90
|
});
|
91
91
|
}
|
92
92
|
|
93
|
+
function hookSidebar() {
|
94
|
+
var navigation = document.querySelector('#navigation');
|
95
|
+
var navigationToggle = document.querySelector('#navigation-toggle');
|
96
|
+
|
97
|
+
navigationToggle.addEventListener('click', function() {
|
98
|
+
navigation.hidden = !navigation.hidden;
|
99
|
+
navigationToggle.ariaExpanded = navigationToggle.ariaExpanded !== 'true';
|
100
|
+
});
|
101
|
+
|
102
|
+
var isSmallViewport = window.matchMedia("(max-width: 1024px)").matches;
|
103
|
+
if (isSmallViewport) {
|
104
|
+
navigation.hidden = true;
|
105
|
+
navigationToggle.ariaExpanded = false;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
93
109
|
document.addEventListener('DOMContentLoaded', function() {
|
94
110
|
hookSourceViews();
|
95
111
|
hookSearch();
|
96
112
|
hookFocus();
|
113
|
+
hookSidebar();
|
97
114
|
});
|
@@ -1,18 +1,18 @@
|
|
1
1
|
<body id="top" role="document" class="file">
|
2
|
-
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
3
|
+
|
4
|
+
<nav id="navigation" role="navigation">
|
3
5
|
<div id="project-navigation">
|
4
6
|
<%= render '_sidebar_navigation.rhtml' %>
|
5
7
|
<%= render '_sidebar_search.rhtml' %>
|
6
8
|
</div>
|
7
9
|
|
8
10
|
<%= render '_sidebar_table_of_contents.rhtml' %>
|
11
|
+
<%= render '_sidebar_pages.rhtml' %>
|
9
12
|
|
10
|
-
|
11
|
-
<%= render '_sidebar_pages.rhtml' %>
|
12
|
-
</div>
|
13
|
+
<%= render '_footer.rhtml' %>
|
13
14
|
</nav>
|
14
15
|
|
15
16
|
<main role="main" aria-label="Page <%=h file.full_name%>">
|
16
17
|
<%= file.description %>
|
17
18
|
</main>
|
18
|
-
|
@@ -1,13 +1,16 @@
|
|
1
1
|
<body role="document">
|
2
|
-
|
3
|
-
<%= render '_sidebar_navigation.rhtml' %>
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%= render '
|
9
|
-
<%= render '_sidebar_classes.rhtml' %>
|
4
|
+
<nav id="navigation" role="navigation">
|
5
|
+
<div id="project-navigation">
|
6
|
+
<%= render '_sidebar_navigation.rhtml' %>
|
7
|
+
<%= render '_sidebar_search.rhtml' %>
|
10
8
|
</div>
|
9
|
+
|
10
|
+
<%= render '_sidebar_pages.rhtml' %>
|
11
|
+
<%= render '_sidebar_classes.rhtml' %>
|
12
|
+
|
13
|
+
<%= render '_footer.rhtml' %>
|
11
14
|
</nav>
|
12
15
|
|
13
16
|
<main role="main">
|
@@ -15,4 +18,3 @@
|
|
15
18
|
|
16
19
|
<p><%= message %>
|
17
20
|
</main>
|
18
|
-
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<body role="document">
|
2
|
-
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
3
|
+
|
4
|
+
<nav id="navigation" role="navigation">
|
3
5
|
<div id="project-navigation">
|
4
6
|
<div id="home-section" class="nav-section">
|
5
7
|
<h2>
|
@@ -10,7 +12,8 @@
|
|
10
12
|
<%= render '_sidebar_search.rhtml' %>
|
11
13
|
</div>
|
12
14
|
|
13
|
-
<%= render '_sidebar_installed.rhtml' %>
|
15
|
+
<%= render '_sidebar_installed.rhtml' %>
|
16
|
+
<%= render '_footer.rhtml' %>
|
14
17
|
</nav>
|
15
18
|
|
16
19
|
<main role="main">
|
@@ -1,4 +1,15 @@
|
|
1
1
|
<body id="top" class="table-of-contents">
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
3
|
+
|
4
|
+
<nav id="navigation" role="navigation">
|
5
|
+
<div id="project-navigation">
|
6
|
+
<%= render '_sidebar_navigation.rhtml' %>
|
7
|
+
|
8
|
+
<%= render '_sidebar_search.rhtml' %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<%= render '_footer.rhtml' %>
|
12
|
+
</nav>
|
2
13
|
<main role="main">
|
3
14
|
<h1 class="class"><%= h @title %></h1>
|
4
15
|
|
data/lib/rdoc/markdown.kpeg
CHANGED
@@ -530,7 +530,7 @@ AtxInline = !@Newline !(@Sp /#*/ @Sp @Newline) Inline
|
|
530
530
|
AtxStart = < /\#{1,6}/ >
|
531
531
|
{ text.length }
|
532
532
|
|
533
|
-
AtxHeading = AtxStart:s @
|
533
|
+
AtxHeading = AtxStart:s @Spacechar+ AtxInline+:a (@Sp /#*/ @Sp)? @Newline
|
534
534
|
{ RDoc::Markup::Heading.new(s, a.join) }
|
535
535
|
|
536
536
|
SetextHeading = SetextHeading1 | SetextHeading2
|
data/lib/rdoc/markdown.rb
CHANGED
@@ -1158,7 +1158,7 @@ class RDoc::Markdown
|
|
1158
1158
|
return _tmp
|
1159
1159
|
end
|
1160
1160
|
|
1161
|
-
# AtxHeading = AtxStart:s @
|
1161
|
+
# AtxHeading = AtxStart:s @Spacechar+ AtxInline+:a (@Sp /#*/ @Sp)? @Newline { RDoc::Markup::Heading.new(s, a.join) }
|
1162
1162
|
def _AtxHeading
|
1163
1163
|
|
1164
1164
|
_save = self.pos
|
@@ -1169,12 +1169,22 @@ class RDoc::Markdown
|
|
1169
1169
|
self.pos = _save
|
1170
1170
|
break
|
1171
1171
|
end
|
1172
|
-
|
1172
|
+
_save1 = self.pos
|
1173
|
+
_tmp = _Spacechar()
|
1174
|
+
if _tmp
|
1175
|
+
while true
|
1176
|
+
_tmp = _Spacechar()
|
1177
|
+
break unless _tmp
|
1178
|
+
end
|
1179
|
+
_tmp = true
|
1180
|
+
else
|
1181
|
+
self.pos = _save1
|
1182
|
+
end
|
1173
1183
|
unless _tmp
|
1174
1184
|
self.pos = _save
|
1175
1185
|
break
|
1176
1186
|
end
|
1177
|
-
|
1187
|
+
_save2 = self.pos
|
1178
1188
|
_ary = []
|
1179
1189
|
_tmp = apply(:_AtxInline)
|
1180
1190
|
if _tmp
|
@@ -1187,37 +1197,37 @@ class RDoc::Markdown
|
|
1187
1197
|
_tmp = true
|
1188
1198
|
@result = _ary
|
1189
1199
|
else
|
1190
|
-
self.pos =
|
1200
|
+
self.pos = _save2
|
1191
1201
|
end
|
1192
1202
|
a = @result
|
1193
1203
|
unless _tmp
|
1194
1204
|
self.pos = _save
|
1195
1205
|
break
|
1196
1206
|
end
|
1197
|
-
_save2 = self.pos
|
1198
|
-
|
1199
1207
|
_save3 = self.pos
|
1208
|
+
|
1209
|
+
_save4 = self.pos
|
1200
1210
|
while true # sequence
|
1201
1211
|
_tmp = _Sp()
|
1202
1212
|
unless _tmp
|
1203
|
-
self.pos =
|
1213
|
+
self.pos = _save4
|
1204
1214
|
break
|
1205
1215
|
end
|
1206
1216
|
_tmp = scan(/\G(?-mix:#*)/)
|
1207
1217
|
unless _tmp
|
1208
|
-
self.pos =
|
1218
|
+
self.pos = _save4
|
1209
1219
|
break
|
1210
1220
|
end
|
1211
1221
|
_tmp = _Sp()
|
1212
1222
|
unless _tmp
|
1213
|
-
self.pos =
|
1223
|
+
self.pos = _save4
|
1214
1224
|
end
|
1215
1225
|
break
|
1216
1226
|
end # end sequence
|
1217
1227
|
|
1218
1228
|
unless _tmp
|
1219
1229
|
_tmp = true
|
1220
|
-
self.pos =
|
1230
|
+
self.pos = _save3
|
1221
1231
|
end
|
1222
1232
|
unless _tmp
|
1223
1233
|
self.pos = _save
|
@@ -16539,7 +16549,7 @@ class RDoc::Markdown
|
|
16539
16549
|
Rules[:_Plain] = rule_info("Plain", "Inlines:a { paragraph a }")
|
16540
16550
|
Rules[:_AtxInline] = rule_info("AtxInline", "!@Newline !(@Sp /\#*/ @Sp @Newline) Inline")
|
16541
16551
|
Rules[:_AtxStart] = rule_info("AtxStart", "< /\\\#{1,6}/ > { text.length }")
|
16542
|
-
Rules[:_AtxHeading] = rule_info("AtxHeading", "AtxStart:s @
|
16552
|
+
Rules[:_AtxHeading] = rule_info("AtxHeading", "AtxStart:s @Spacechar+ AtxInline+:a (@Sp /\#*/ @Sp)? @Newline { RDoc::Markup::Heading.new(s, a.join) }")
|
16543
16553
|
Rules[:_SetextHeading] = rule_info("SetextHeading", "(SetextHeading1 | SetextHeading2)")
|
16544
16554
|
Rules[:_SetextBottom1] = rule_info("SetextBottom1", "/={1,}/ @Newline")
|
16545
16555
|
Rules[:_SetextBottom2] = rule_info("SetextBottom2", "/-{1,}/ @Newline")
|
@@ -260,7 +260,7 @@ class RDoc::Markup::AttributeManager
|
|
260
260
|
|
261
261
|
def add_word_pair(start, stop, name, exclusive = false)
|
262
262
|
raise ArgumentError, "Word flags may not start with '<'" if
|
263
|
-
start[0,1] == '<'
|
263
|
+
start[0, 1] == '<'
|
264
264
|
|
265
265
|
bitmap = @attributes.bitmap_for name
|
266
266
|
|
@@ -271,7 +271,7 @@ class RDoc::Markup::AttributeManager
|
|
271
271
|
@word_pair_map[pattern] = bitmap
|
272
272
|
end
|
273
273
|
|
274
|
-
@protectable << start[0,1]
|
274
|
+
@protectable << start[0, 1]
|
275
275
|
@protectable.uniq!
|
276
276
|
|
277
277
|
@exclusive_bitmap |= bitmap if exclusive
|
@@ -97,15 +97,18 @@ class RDoc::Markup::PreProcess
|
|
97
97
|
# RDoc::CodeObject#metadata for details.
|
98
98
|
|
99
99
|
def handle text, code_object = nil, &block
|
100
|
+
first_line = 1
|
100
101
|
if RDoc::Comment === text then
|
101
102
|
comment = text
|
102
103
|
text = text.text
|
104
|
+
first_line = comment.line || 1
|
103
105
|
end
|
104
106
|
|
105
107
|
# regexp helper (square brackets for optional)
|
106
108
|
# $1 $2 $3 $4 $5
|
107
109
|
# [prefix][\]:directive:[spaces][param]newline
|
108
|
-
text = text.
|
110
|
+
text = text.lines.map.with_index(first_line) do |line, num|
|
111
|
+
next line unless line =~ /\A([ \t]*(?:#|\/?\*)?[ \t]*)(\\?):([\w-]+):([ \t]*)(.+)?(\r?\n|$)/
|
109
112
|
# skip something like ':toto::'
|
110
113
|
next $& if $4.empty? and $5 and $5[0, 1] == ':'
|
111
114
|
|
@@ -120,8 +123,8 @@ class RDoc::Markup::PreProcess
|
|
120
123
|
next "#{$1.strip}\n"
|
121
124
|
end
|
122
125
|
|
123
|
-
handle_directive $1, $3, $5, code_object, text.encoding, &block
|
124
|
-
end
|
126
|
+
handle_directive $1, $3, $5, code_object, text.encoding, num, &block
|
127
|
+
end.join
|
125
128
|
|
126
129
|
if comment then
|
127
130
|
comment.text = text
|
@@ -148,7 +151,7 @@ class RDoc::Markup::PreProcess
|
|
148
151
|
# When 1.8.7 support is ditched prefix can be defaulted to ''
|
149
152
|
|
150
153
|
def handle_directive prefix, directive, param, code_object = nil,
|
151
|
-
encoding = nil
|
154
|
+
encoding = nil, line = nil
|
152
155
|
blankline = "#{prefix.strip}\n"
|
153
156
|
directive = directive.downcase
|
154
157
|
|
@@ -220,11 +223,11 @@ class RDoc::Markup::PreProcess
|
|
220
223
|
# remove parameter &block
|
221
224
|
code_object.params = code_object.params.sub(/,?\s*&\w+/, '') if code_object.params
|
222
225
|
|
223
|
-
code_object.block_params = param
|
226
|
+
code_object.block_params = param || ''
|
224
227
|
|
225
228
|
blankline
|
226
229
|
else
|
227
|
-
result = yield directive, param if block_given?
|
230
|
+
result = yield directive, param, line if block_given?
|
228
231
|
|
229
232
|
case result
|
230
233
|
when nil then
|
data/lib/rdoc/markup/to_bs.rb
CHANGED
@@ -24,7 +24,7 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
|
|
24
24
|
def init_tags
|
25
25
|
add_tag :BOLD, '+b', '-b'
|
26
26
|
add_tag :EM, '+_', '-_'
|
27
|
-
add_tag :TT, ''
|
27
|
+
add_tag :TT, '', '' # we need in_tt information maintained
|
28
28
|
end
|
29
29
|
|
30
30
|
##
|
data/lib/rdoc/markup/to_rdoc.rb
CHANGED
@@ -249,8 +249,8 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
|
|
249
249
|
# Adds +table+ to the output
|
250
250
|
|
251
251
|
def accept_table header, body, aligns
|
252
|
-
widths = header.zip(body) do |
|
253
|
-
|
252
|
+
widths = header.zip(*body).map do |cols|
|
253
|
+
cols.map(&:size).max
|
254
254
|
end
|
255
255
|
aligns = aligns.map do |a|
|
256
256
|
case a
|
@@ -262,12 +262,12 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
|
|
262
262
|
:rjust
|
263
263
|
end
|
264
264
|
end
|
265
|
-
@res << header.zip(widths, aligns) do |h, w, a|
|
265
|
+
@res << header.zip(widths, aligns).map do |h, w, a|
|
266
266
|
h.__send__(a, w)
|
267
267
|
end.join("|").rstrip << "\n"
|
268
268
|
@res << widths.map {|w| "-" * w }.join("|") << "\n"
|
269
269
|
body.each do |row|
|
270
|
-
@res << row.zip(widths, aligns) do |t, w, a|
|
270
|
+
@res << row.zip(widths, aligns).map do |t, w, a|
|
271
271
|
t.__send__(a, w)
|
272
272
|
end.join("|").rstrip << "\n"
|
273
273
|
end
|
data/lib/rdoc/markup.rb
CHANGED
@@ -10,19 +10,24 @@
|
|
10
10
|
# RDoc::Markup and other markup formats do no output formatting, this is
|
11
11
|
# handled by the RDoc::Markup::Formatter subclasses.
|
12
12
|
#
|
13
|
-
# =
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
13
|
+
# = Markup Formats
|
14
|
+
#
|
15
|
+
# +RDoc+ supports these markup formats:
|
16
|
+
#
|
17
|
+
# - +rdoc+:
|
18
|
+
# the +RDoc+ markup format;
|
19
|
+
# see RDoc::MarkupReference.
|
20
|
+
# - +markdown+:
|
21
|
+
# The +markdown+ markup format as described in
|
22
|
+
# the {Markdown Guide}[https://www.markdownguide.org];
|
23
|
+
# see RDoc::Markdown.
|
24
|
+
# - +rd+:
|
25
|
+
# the +rd+ markup format format;
|
26
|
+
# see RDoc::RD.
|
27
|
+
# - +tomdoc+:
|
28
|
+
# the TomDoc format as described in
|
29
|
+
# {TomDoc for Ruby}[http://tomdoc.org];
|
30
|
+
# see RDoc::TomDoc.
|
26
31
|
#
|
27
32
|
# You can choose a markup format using the following methods:
|
28
33
|
#
|
data/lib/rdoc/options.rb
CHANGED
@@ -233,9 +233,9 @@ class RDoc::Options
|
|
233
233
|
attr_accessor :main_page
|
234
234
|
|
235
235
|
##
|
236
|
-
# The
|
237
|
-
#
|
238
|
-
|
236
|
+
# The markup format.
|
237
|
+
# One of: +rdoc+ (the default), +markdown+, +rd+, +tomdoc+.
|
238
|
+
# See {Markup Formats}[rdoc-ref:RDoc::Markup@Markup+Formats].
|
239
239
|
attr_accessor :markup
|
240
240
|
|
241
241
|
##
|
@@ -344,6 +344,11 @@ class RDoc::Options
|
|
344
344
|
# Indicates if files of test suites should be skipped
|
345
345
|
attr_accessor :skip_tests
|
346
346
|
|
347
|
+
##
|
348
|
+
# Embed mixin methods, attributes, and constants into class documentation. Set via
|
349
|
+
# +--[no-]embed-mixins+ (Default is +false+.)
|
350
|
+
attr_accessor :embed_mixins
|
351
|
+
|
347
352
|
def initialize loaded_options = nil # :nodoc:
|
348
353
|
init_ivars
|
349
354
|
override loaded_options if loaded_options
|
@@ -351,6 +356,7 @@ class RDoc::Options
|
|
351
356
|
|
352
357
|
def init_ivars # :nodoc:
|
353
358
|
@dry_run = false
|
359
|
+
@embed_mixins = false
|
354
360
|
@exclude = %w[
|
355
361
|
~\z \.orig\z \.rej\z \.bak\z
|
356
362
|
\.gemspec\z
|
@@ -401,6 +407,7 @@ class RDoc::Options
|
|
401
407
|
@encoding = encoding ? Encoding.find(encoding) : encoding
|
402
408
|
|
403
409
|
@charset = map['charset']
|
410
|
+
@embed_mixins = map['embed_mixins']
|
404
411
|
@exclude = map['exclude']
|
405
412
|
@generator_name = map['generator_name']
|
406
413
|
@hyperlink_all = map['hyperlink_all']
|
@@ -432,6 +439,7 @@ class RDoc::Options
|
|
432
439
|
end
|
433
440
|
|
434
441
|
@charset = map['charset'] if map.has_key?('charset')
|
442
|
+
@embed_mixins = map['embed_mixins'] if map.has_key?('embed_mixins')
|
435
443
|
@exclude = map['exclude'] if map.has_key?('exclude')
|
436
444
|
@generator_name = map['generator_name'] if map.has_key?('generator_name')
|
437
445
|
@hyperlink_all = map['hyperlink_all'] if map.has_key?('hyperlink_all')
|
@@ -460,11 +468,12 @@ class RDoc::Options
|
|
460
468
|
def == other # :nodoc:
|
461
469
|
self.class === other and
|
462
470
|
@encoding == other.encoding and
|
471
|
+
@embed_mixins == other.embed_mixins and
|
463
472
|
@generator_name == other.generator_name and
|
464
473
|
@hyperlink_all == other.hyperlink_all and
|
465
474
|
@line_numbers == other.line_numbers and
|
466
475
|
@locale == other.locale and
|
467
|
-
@locale_dir == other.locale_dir
|
476
|
+
@locale_dir == other.locale_dir and
|
468
477
|
@main_page == other.main_page and
|
469
478
|
@markup == other.markup and
|
470
479
|
@op_dir == other.op_dir and
|
@@ -683,7 +692,7 @@ Usage: #{opt.program_name} [options] [names...]
|
|
683
692
|
|
684
693
|
EOF
|
685
694
|
|
686
|
-
parsers = Hash.new { |h,parser| h[parser] = [] }
|
695
|
+
parsers = Hash.new { |h, parser| h[parser] = [] }
|
687
696
|
|
688
697
|
RDoc::Parser.parsers.each do |regexp, parser|
|
689
698
|
parsers[parser.name.sub('RDoc::Parser::', '')] << regexp.source
|
@@ -842,6 +851,14 @@ Usage: #{opt.program_name} [options] [names...]
|
|
842
851
|
|
843
852
|
opt.separator nil
|
844
853
|
|
854
|
+
opt.on("--[no-]embed-mixins",
|
855
|
+
"Embed mixin methods, attributes, and constants",
|
856
|
+
"into class documentation. (default false)") do |value|
|
857
|
+
@embed_mixins = value
|
858
|
+
end
|
859
|
+
|
860
|
+
opt.separator nil
|
861
|
+
|
845
862
|
markup_formats = RDoc::Text::MARKUP_FORMAT.keys.sort
|
846
863
|
|
847
864
|
opt.on("--markup=MARKUP", markup_formats,
|
data/lib/rdoc/parser/c.rb
CHANGED
@@ -440,7 +440,7 @@ class RDoc::Parser::C < RDoc::Parser
|
|
440
440
|
# Scans #content for rb_include_module
|
441
441
|
|
442
442
|
def do_includes
|
443
|
-
@content.scan(/rb_include_module\s*\(\s*(\w+?),\s*(\w+?)\s*\)/) do |c,m|
|
443
|
+
@content.scan(/rb_include_module\s*\(\s*(\w+?),\s*(\w+?)\s*\)/) do |c, m|
|
444
444
|
next unless cls = @classes[c]
|
445
445
|
m = @known_classes[m] || m
|
446
446
|
|
@@ -193,7 +193,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
|
|
193
193
|
|
194
194
|
entries << [entry_name, entry_body] if entry_name
|
195
195
|
|
196
|
-
entries.reject! do |(entry,_)|
|
196
|
+
entries.reject! do |(entry, _)|
|
197
197
|
entry == nil
|
198
198
|
end
|
199
199
|
|
@@ -221,7 +221,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
|
|
221
221
|
|
222
222
|
module Git
|
223
223
|
##
|
224
|
-
# Parses auxiliary info.
|
224
|
+
# Parses auxiliary info. Currently `base-url` to expand
|
225
225
|
# references is effective.
|
226
226
|
|
227
227
|
def parse_info(info)
|