rdoc 2.1.0 → 2.2.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/History.txt +82 -1
- data/Manifest.txt +8 -0
- data/README.txt +33 -9
- data/RI.txt +58 -0
- data/Rakefile +2 -0
- data/bin/ri +1 -2
- data/lib/rdoc.rb +154 -36
- data/lib/rdoc/code_objects.rb +38 -2
- data/lib/rdoc/diagram.rb +17 -15
- data/lib/rdoc/generator.rb +21 -15
- data/lib/rdoc/generator/chm/chm.rb +2 -0
- data/lib/rdoc/generator/html.rb +137 -89
- data/lib/rdoc/generator/html/common.rb +24 -0
- data/lib/rdoc/generator/html/frameless.rb +28 -731
- data/lib/rdoc/generator/html/hefss.rb +47 -311
- data/lib/rdoc/generator/html/html.rb +226 -156
- data/lib/rdoc/generator/html/kilmer.rb +31 -298
- data/lib/rdoc/generator/html/kilmerfactory.rb +427 -0
- data/lib/rdoc/generator/html/one_page_html.rb +6 -5
- data/lib/rdoc/generator/texinfo.rb +3 -6
- data/lib/rdoc/generator/xml.rb +4 -7
- data/lib/rdoc/generator/xml/xml.rb +21 -9
- data/lib/rdoc/markup.rb +0 -95
- data/lib/rdoc/markup/inline.rb +1 -1
- data/lib/rdoc/markup/to_html.rb +9 -6
- data/lib/rdoc/markup/to_html_crossref.rb +67 -21
- data/lib/rdoc/markup/to_texinfo.rb +1 -1
- data/lib/rdoc/parser.rb +22 -1
- data/lib/rdoc/parser/c.rb +14 -16
- data/lib/rdoc/parser/ruby.rb +3 -3
- data/lib/rdoc/parser/simple.rb +1 -1
- data/lib/rdoc/rdoc.rb +0 -1
- data/lib/rdoc/ri/cache.rb +5 -6
- data/lib/rdoc/ri/descriptions.rb +3 -0
- data/lib/rdoc/ri/display.rb +157 -37
- data/lib/rdoc/ri/driver.rb +314 -198
- data/lib/rdoc/ri/formatter.rb +1 -1
- data/lib/rdoc/ri/paths.rb +2 -11
- data/lib/rdoc/ri/reader.rb +3 -3
- data/lib/rdoc/ri/util.rb +0 -2
- data/test/binary.dat +0 -0
- data/test/rdoc_markup_to_html_crossref_reference.rb +31 -0
- data/test/test_attribute_manager.rb +73 -0
- data/test/test_rdoc_info_formatting.rb +6 -6
- data/test/test_rdoc_info_sections.rb +2 -2
- data/test/test_rdoc_markup_attribute_manager.rb +14 -14
- data/test/test_rdoc_markup_to_html.rb +15 -3
- data/test/test_rdoc_markup_to_html_crossref.rb +276 -7
- data/test/test_rdoc_parser.rb +13 -0
- data/test/test_rdoc_parser_c.rb +1 -1
- data/test/test_rdoc_parser_ruby.rb +72 -1
- data/test/test_rdoc_ri_default_display.rb +23 -22
- data/test/test_rdoc_ri_driver.rb +1 -1
- data/test/test_rdoc_ri_formatter.rb +1 -1
- metadata +27 -35
- data.tar.gz.sig +0 -1
- metadata.gz.sig +0 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
#
|
2
|
+
# The templates require further refactoring. In particular,
|
3
|
+
# * Some kind of HTML generation library should be used.
|
4
|
+
#
|
5
|
+
# Also, all of the templates require some TLC from a designer.
|
6
|
+
#
|
7
|
+
# Right now, this file contains some constants that are used by all
|
8
|
+
# of the templates.
|
9
|
+
#
|
10
|
+
module RDoc::Generator::HTML::Common
|
11
|
+
XHTML_STRICT_PREAMBLE = <<-EOF
|
12
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
13
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
14
|
+
EOF
|
15
|
+
|
16
|
+
XHTML_FRAME_PREAMBLE = <<-EOF
|
17
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
18
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
19
|
+
EOF
|
20
|
+
|
21
|
+
HTML_ELEMENT = <<-EOF
|
22
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
23
|
+
EOF
|
24
|
+
end
|
@@ -1,15 +1,16 @@
|
|
1
|
-
require 'rdoc/generator/html'
|
2
|
-
require 'rdoc/generator/html/one_page_html'
|
1
|
+
require 'rdoc/generator/html/html'
|
3
2
|
|
4
3
|
##
|
5
4
|
# = CSS2 RDoc HTML template
|
6
5
|
#
|
7
|
-
# This is a template for RDoc that uses XHTML 1.0
|
6
|
+
# This is a template for RDoc that uses XHTML 1.0 Strict and dictates a
|
8
7
|
# bit more of the appearance of the output to cascading stylesheets than the
|
9
8
|
# default. It was designed for clean inline code display, and uses DHTMl to
|
10
9
|
# toggle the visbility of each method's source with each click on the '[source]'
|
11
10
|
# link.
|
12
11
|
#
|
12
|
+
# Frameless basically is the html template without frames.
|
13
|
+
#
|
13
14
|
# == Authors
|
14
15
|
#
|
15
16
|
# * Michael Granger <ged@FaerieMUD.org>
|
@@ -25,692 +26,47 @@ module RDoc::Generator::HTML::FRAMELESS
|
|
25
26
|
|
26
27
|
FRAMELESS = true
|
27
28
|
|
28
|
-
FONTS =
|
29
|
-
|
30
|
-
STYLE = <<-EOF
|
31
|
-
body {
|
32
|
-
font-family: #{FONTS};
|
33
|
-
font-size: 90%;
|
34
|
-
margin: 0;
|
35
|
-
margin-left: 40px;
|
36
|
-
padding: 0;
|
37
|
-
background: white;
|
38
|
-
}
|
39
|
-
|
40
|
-
h1, h2, h3, h4 {
|
41
|
-
margin: 0;
|
42
|
-
color: #efefef;
|
43
|
-
background: transparent;
|
44
|
-
}
|
45
|
-
|
46
|
-
h1 {
|
47
|
-
font-size: 150%;
|
48
|
-
}
|
49
|
-
|
50
|
-
h2,h3,h4 {
|
51
|
-
margin-top: 1em;
|
52
|
-
}
|
53
|
-
|
54
|
-
:link, :visited {
|
55
|
-
background: #eef;
|
56
|
-
color: #039;
|
57
|
-
text-decoration: none;
|
58
|
-
}
|
59
|
-
|
60
|
-
:link:hover, :visited:hover {
|
61
|
-
background: #039;
|
62
|
-
color: #eef;
|
63
|
-
}
|
64
|
-
|
65
|
-
/* Override the base stylesheet's Anchor inside a table cell */
|
66
|
-
td > :link, td > :visited {
|
67
|
-
background: transparent;
|
68
|
-
color: #039;
|
69
|
-
text-decoration: none;
|
70
|
-
}
|
71
|
-
|
72
|
-
/* and inside a section title */
|
73
|
-
.section-title > :link, .section-title > :visited {
|
74
|
-
background: transparent;
|
75
|
-
color: #eee;
|
76
|
-
text-decoration: none;
|
77
|
-
}
|
78
|
-
|
79
|
-
/* === Structural elements =================================== */
|
80
|
-
|
81
|
-
.index {
|
82
|
-
margin: 0;
|
83
|
-
margin-left: -40px;
|
84
|
-
padding: 0;
|
85
|
-
font-size: 90%;
|
86
|
-
}
|
87
|
-
|
88
|
-
.index :link, .index :visited {
|
89
|
-
margin-left: 0.7em;
|
90
|
-
}
|
91
|
-
|
92
|
-
.index .section-bar {
|
93
|
-
margin-left: 0px;
|
94
|
-
padding-left: 0.7em;
|
95
|
-
background: #ccc;
|
96
|
-
font-size: small;
|
97
|
-
}
|
98
|
-
|
99
|
-
#classHeader, #fileHeader {
|
100
|
-
width: auto;
|
101
|
-
color: white;
|
102
|
-
padding: 0.5em 1.5em 0.5em 1.5em;
|
103
|
-
margin: 0;
|
104
|
-
margin-left: -40px;
|
105
|
-
border-bottom: 3px solid #006;
|
106
|
-
}
|
107
|
-
|
108
|
-
#classHeader :link, #fileHeader :link,
|
109
|
-
#classHeader :visited, #fileHeader :visited {
|
110
|
-
background: inherit;
|
111
|
-
color: white;
|
112
|
-
}
|
113
|
-
|
114
|
-
#classHeader td, #fileHeader td {
|
115
|
-
background: inherit;
|
116
|
-
color: white;
|
117
|
-
}
|
118
|
-
|
119
|
-
#fileHeader {
|
120
|
-
background: #057;
|
121
|
-
}
|
122
|
-
|
123
|
-
#classHeader {
|
124
|
-
background: #048;
|
125
|
-
}
|
126
|
-
|
127
|
-
.class-name-in-header {
|
128
|
-
font-size: 180%;
|
129
|
-
font-weight: bold;
|
130
|
-
}
|
131
|
-
|
132
|
-
#bodyContent {
|
133
|
-
padding: 0 1.5em 0 1.5em;
|
134
|
-
}
|
135
|
-
|
136
|
-
#description {
|
137
|
-
padding: 0.5em 1.5em;
|
138
|
-
background: #efefef;
|
139
|
-
border: 1px dotted #999;
|
140
|
-
}
|
141
|
-
|
142
|
-
#description h1, #description h2, #description h3,
|
143
|
-
#description h4, #description h5, #description h6 {
|
144
|
-
color: #125;
|
145
|
-
background: transparent;
|
146
|
-
}
|
147
|
-
|
148
|
-
#copyright {
|
149
|
-
color: #333;
|
150
|
-
background: #efefef;
|
151
|
-
font: 0.75em sans-serif;
|
152
|
-
margin-top: 5em;
|
153
|
-
margin-bottom: 0;
|
154
|
-
padding: 0.5em 2em;
|
155
|
-
}
|
156
|
-
|
157
|
-
/* === Classes =================================== */
|
158
|
-
|
159
|
-
table.header-table {
|
160
|
-
color: white;
|
161
|
-
font-size: small;
|
162
|
-
}
|
163
|
-
|
164
|
-
.type-note {
|
165
|
-
font-size: small;
|
166
|
-
color: #dedede;
|
167
|
-
}
|
168
|
-
|
169
|
-
.xxsection-bar {
|
170
|
-
background: #eee;
|
171
|
-
color: #333;
|
172
|
-
padding: 3px;
|
173
|
-
}
|
174
|
-
|
175
|
-
.section-bar {
|
176
|
-
color: #333;
|
177
|
-
border-bottom: 1px solid #999;
|
178
|
-
margin-left: -20px;
|
179
|
-
}
|
180
|
-
|
181
|
-
.section-title {
|
182
|
-
background: #79a;
|
183
|
-
color: #eee;
|
184
|
-
padding: 3px;
|
185
|
-
margin-top: 2em;
|
186
|
-
margin-left: -30px;
|
187
|
-
border: 1px solid #999;
|
188
|
-
}
|
189
|
-
|
190
|
-
.top-aligned-row {
|
191
|
-
vertical-align: top
|
192
|
-
}
|
193
|
-
|
194
|
-
.bottom-aligned-row {
|
195
|
-
vertical-align: bottom
|
196
|
-
}
|
197
|
-
|
198
|
-
/* --- Context section classes ----------------------- */
|
199
|
-
|
200
|
-
.context-row { }
|
201
|
-
|
202
|
-
.context-item-name {
|
203
|
-
font-family: monospace;
|
204
|
-
font-weight: bold;
|
205
|
-
color: black;
|
206
|
-
}
|
207
|
-
|
208
|
-
.context-item-value {
|
209
|
-
font-size: small;
|
210
|
-
color: #448;
|
211
|
-
}
|
212
|
-
|
213
|
-
.context-item-desc {
|
214
|
-
color: #333;
|
215
|
-
padding-left: 2em;
|
216
|
-
}
|
217
|
-
|
218
|
-
/* --- Method classes -------------------------- */
|
219
|
-
|
220
|
-
.method-detail {
|
221
|
-
background: #efefef;
|
222
|
-
padding: 0;
|
223
|
-
margin-top: 0.5em;
|
224
|
-
margin-bottom: 1em;
|
225
|
-
border: 1px dotted #ccc;
|
226
|
-
}
|
227
|
-
|
228
|
-
.method-heading {
|
229
|
-
color: black;
|
230
|
-
background: #ccc;
|
231
|
-
border-bottom: 1px solid #666;
|
232
|
-
padding: 0.2em 0.5em 0 0.5em;
|
233
|
-
}
|
234
|
-
|
235
|
-
.method-signature {
|
236
|
-
color: black;
|
237
|
-
background: inherit;
|
238
|
-
}
|
239
|
-
|
240
|
-
.method-name {
|
241
|
-
font-weight: bold;
|
242
|
-
}
|
243
|
-
|
244
|
-
.method-args {
|
245
|
-
font-style: italic;
|
246
|
-
}
|
29
|
+
FONTS = RDoc::Generator::HTML::HTML::FONTS
|
247
30
|
|
248
|
-
|
249
|
-
padding: 0 0.5em 0 0.5em;
|
250
|
-
}
|
31
|
+
STYLE = RDoc::Generator::HTML::HTML::STYLE
|
251
32
|
|
252
|
-
|
253
|
-
|
254
|
-
:link.source-toggle, :visited.source-toggle {
|
255
|
-
font-size: 90%;
|
256
|
-
}
|
257
|
-
|
258
|
-
div.method-source-code {
|
259
|
-
background: #262626;
|
260
|
-
color: #ffdead;
|
261
|
-
margin: 1em;
|
262
|
-
padding: 0.5em;
|
263
|
-
border: 1px dashed #999;
|
264
|
-
overflow: hidden;
|
265
|
-
}
|
266
|
-
|
267
|
-
div.method-source-code pre {
|
268
|
-
color: #ffdead;
|
269
|
-
overflow: hidden;
|
270
|
-
}
|
271
|
-
|
272
|
-
/* --- Ruby keyword styles --------------------- */
|
273
|
-
|
274
|
-
.standalone-code {
|
275
|
-
background: #221111;
|
276
|
-
color: #ffdead;
|
277
|
-
overflow: hidden;
|
278
|
-
}
|
279
|
-
|
280
|
-
.ruby-constant {
|
281
|
-
color: #7fffd4;
|
282
|
-
background: transparent;
|
283
|
-
}
|
284
|
-
|
285
|
-
.ruby-keyword {
|
286
|
-
color: #00ffff;
|
287
|
-
background: transparent;
|
288
|
-
}
|
289
|
-
|
290
|
-
.ruby-ivar {
|
291
|
-
color: #eedd82;
|
292
|
-
background: transparent;
|
293
|
-
}
|
294
|
-
|
295
|
-
.ruby-operator {
|
296
|
-
color: #00ffee;
|
297
|
-
background: transparent;
|
298
|
-
}
|
299
|
-
|
300
|
-
.ruby-identifier {
|
301
|
-
color: #ffdead;
|
302
|
-
background: transparent;
|
303
|
-
}
|
304
|
-
|
305
|
-
.ruby-node {
|
306
|
-
color: #ffa07a;
|
307
|
-
background: transparent;
|
308
|
-
}
|
309
|
-
|
310
|
-
.ruby-comment {
|
311
|
-
color: #b22222;
|
312
|
-
font-weight: bold;
|
313
|
-
background: transparent;
|
314
|
-
}
|
315
|
-
|
316
|
-
.ruby-regexp {
|
317
|
-
color: #ffa07a;
|
318
|
-
background: transparent;
|
319
|
-
}
|
320
|
-
|
321
|
-
.ruby-value {
|
322
|
-
color: #7fffd4;
|
323
|
-
background: transparent;
|
324
|
-
}
|
325
|
-
|
326
|
-
EOF
|
327
|
-
|
328
|
-
##
|
329
|
-
# Header template
|
330
|
-
|
331
|
-
XHTML_PREAMBLE = <<-EOF
|
332
|
-
<?xml version="1.0" encoding="<%= values["charset"] %>"?>
|
333
|
-
<!DOCTYPE html
|
334
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
335
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
336
|
-
EOF
|
337
|
-
|
338
|
-
HEADER = XHTML_PREAMBLE + <<-EOF
|
339
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
340
|
-
<head>
|
341
|
-
<title><%= values["title"] %></title>
|
342
|
-
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
343
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
344
|
-
<link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
|
345
|
-
<script type="text/javascript">
|
346
|
-
// <![CDATA[
|
347
|
-
|
348
|
-
function popupCode( url ) {
|
349
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
350
|
-
}
|
351
|
-
|
352
|
-
function toggleCode( id ) {
|
353
|
-
if ( document.getElementById )
|
354
|
-
elem = document.getElementById( id );
|
355
|
-
else if ( document.all )
|
356
|
-
elem = eval( "document.all." + id );
|
357
|
-
else
|
358
|
-
return false;
|
359
|
-
|
360
|
-
elemStyle = elem.style;
|
361
|
-
|
362
|
-
if ( elemStyle.display != "block" ) {
|
363
|
-
elemStyle.display = "block"
|
364
|
-
} else {
|
365
|
-
elemStyle.display = "none"
|
366
|
-
}
|
367
|
-
|
368
|
-
return true;
|
369
|
-
}
|
370
|
-
|
371
|
-
// Make codeblocks hidden by default
|
372
|
-
document.writeln( "<style type=\\"text/css\\">div.method-source-code { display: none }</style>" )
|
373
|
-
|
374
|
-
// ]]>
|
375
|
-
</script>
|
376
|
-
|
377
|
-
</head>
|
378
|
-
<body>
|
379
|
-
EOF
|
380
|
-
|
381
|
-
##
|
382
|
-
# Context content template
|
383
|
-
|
384
|
-
CONTEXT_CONTENT = %{
|
385
|
-
}
|
386
|
-
|
387
|
-
##
|
388
|
-
# Footer template
|
33
|
+
HEADER = RDoc::Generator::HTML::HTML::HEADER
|
389
34
|
|
390
35
|
FOOTER = <<-EOF
|
391
36
|
<div id="popupmenu" class="index">
|
392
|
-
<
|
393
|
-
<
|
37
|
+
<br />
|
38
|
+
<h1 class="index-entries section-bar">Files</h1>
|
394
39
|
<ul>
|
395
|
-
<% values["
|
396
|
-
<li><a href="<%=
|
40
|
+
<% values["file_list"].each do |file| %>
|
41
|
+
<li><a href="<%= file["href"] %>"><%= file["name"] %></a></li>
|
397
42
|
<% end %>
|
398
43
|
</ul>
|
399
|
-
</li>
|
400
44
|
|
401
|
-
<
|
45
|
+
<br />
|
46
|
+
<h1 class="index-entries section-bar">Classes</h1>
|
402
47
|
<ul>
|
403
|
-
<% values["
|
404
|
-
<li><a href="<%=
|
48
|
+
<% values["class_list"].each do |klass| %>
|
49
|
+
<li><a href="<%= klass["href"] %>"><%= klass["name"] %></a></li>
|
405
50
|
<% end %>
|
406
51
|
</ul>
|
407
|
-
</li>
|
408
52
|
|
409
|
-
<
|
53
|
+
<br />
|
54
|
+
<h1 class="index-entries section-bar">Methods</h1>
|
410
55
|
<ul>
|
411
|
-
<% values["
|
412
|
-
<li><a href="<%=
|
56
|
+
<% values["method_list"].each do |method| %>
|
57
|
+
<li><a href="<%= method["href"] %>"><%= method["name"] %></a></li>
|
413
58
|
<% end %>
|
414
59
|
</ul>
|
415
|
-
|
416
|
-
</ul>
|
417
|
-
</li>
|
418
|
-
|
60
|
+
</div>
|
419
61
|
</body>
|
420
62
|
</html>
|
421
63
|
EOF
|
422
64
|
|
423
|
-
|
424
|
-
# File page header template
|
425
|
-
|
426
|
-
FILE_PAGE = <<-EOF
|
427
|
-
<div id="fileHeader">
|
428
|
-
<h1><%= values["short_name"] %></h1>
|
429
|
-
|
430
|
-
<table class="header-table">
|
431
|
-
<tr class="top-aligned-row">
|
432
|
-
<td><strong>Path:</strong></td>
|
433
|
-
<td><%= values["full_path"] %>
|
434
|
-
<% if values["cvsurl"] then %>
|
435
|
-
(<a href="<%= values["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
|
436
|
-
<% end %>
|
437
|
-
</td>
|
438
|
-
</tr>
|
439
|
-
|
440
|
-
<tr class="top-aligned-row">
|
441
|
-
<td><strong>Last Update:</strong></td>
|
442
|
-
<td><%= values["dtm_modified"] %></td>
|
443
|
-
</tr>
|
444
|
-
</table>
|
445
|
-
</div>
|
446
|
-
EOF
|
447
|
-
|
448
|
-
##
|
449
|
-
# Class page header template
|
450
|
-
|
451
|
-
CLASS_PAGE = <<-EOF
|
452
|
-
<div id="classHeader">
|
453
|
-
<table class="header-table">
|
454
|
-
<tr class="top-aligned-row">
|
455
|
-
<td><strong><%= values["classmod"] %></strong></td>
|
456
|
-
<td class="class-name-in-header"><%= values["full_name"] %></td>
|
457
|
-
</tr>
|
458
|
-
|
459
|
-
<tr class="top-aligned-row">
|
460
|
-
<td><strong>In:</strong></td>
|
461
|
-
<td>
|
462
|
-
<% values["infiles"].each do |infiles| %>
|
463
|
-
<% if infiles["full_path_url"] then %>
|
464
|
-
<a href="<%= infiles["full_path_url"] %>">
|
465
|
-
<% end %>
|
466
|
-
<%= infiles["full_path"] %>
|
467
|
-
<% if infiles["full_path_url"] then %>
|
468
|
-
</a>
|
469
|
-
<% end %>
|
470
|
-
<% if infiles["cvsurl"] then %>
|
471
|
-
(<a href="<%= infiles["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
|
472
|
-
<% end %>
|
473
|
-
<br />
|
474
|
-
<% end %><%# values["infiles"] %>
|
475
|
-
</td>
|
476
|
-
</tr>
|
477
|
-
|
478
|
-
<% if values["parent"] then %>
|
479
|
-
<tr class="top-aligned-row">
|
480
|
-
<td><strong>Parent:</strong></td>
|
481
|
-
<td>
|
482
|
-
<% if values["par_url"] then %>
|
483
|
-
<a href="<%= values["par_url"] %>">
|
484
|
-
<% end %>
|
485
|
-
<%= values["parent"] %>
|
486
|
-
<% if values["par_url"] then %>
|
487
|
-
</a>
|
488
|
-
<% end %>
|
489
|
-
</td>
|
490
|
-
</tr>
|
491
|
-
<% end %>
|
492
|
-
</table>
|
493
|
-
</div>
|
494
|
-
EOF
|
495
|
-
|
496
|
-
##
|
497
|
-
# Method list template
|
498
|
-
|
499
|
-
METHOD_LIST = <<-EOF
|
500
|
-
|
501
|
-
<div id="contextContent">
|
502
|
-
<% if values["diagram"] then %>
|
503
|
-
<div id="diagram">
|
504
|
-
<%= values["diagram"] %>
|
505
|
-
</div>
|
506
|
-
<% end %>
|
507
|
-
|
508
|
-
<% if values["description"] then %>
|
509
|
-
<div id="description">
|
510
|
-
<%= values["description"] %>
|
511
|
-
</div>
|
512
|
-
<% end %>
|
513
|
-
|
514
|
-
<% if values["requires"] then %>
|
515
|
-
<div id="requires-list">
|
516
|
-
<h3 class="section-bar">Required files</h3>
|
517
|
-
|
518
|
-
<div class="name-list">
|
519
|
-
<% values["requires"].each do |requires| %>
|
520
|
-
<%= href requires["aref"], requires["name"] %>
|
521
|
-
<% end %><%# values["requires"] %>
|
522
|
-
</div>
|
523
|
-
</div>
|
524
|
-
<% end %>
|
525
|
-
|
526
|
-
<% if values["toc"] then %>
|
527
|
-
<div id="contents-list">
|
528
|
-
<h3 class="section-bar">Contents</h3>
|
529
|
-
<ul>
|
530
|
-
<% values["toc"].each do |toc| %>
|
531
|
-
<li><a href="#<%= values["href"] %>"><%= values["secname"] %></a></li>
|
532
|
-
<% end %><%# values["toc"] %>
|
533
|
-
</ul>
|
534
|
-
<% end %>
|
535
|
-
</div>
|
536
|
-
|
537
|
-
<% if values["methods"] then %>
|
538
|
-
<div id="method-list">
|
539
|
-
<h3 class="section-bar">Methods</h3>
|
65
|
+
FILE_PAGE = RDoc::Generator::HTML::HTML::FILE_PAGE
|
540
66
|
|
541
|
-
|
542
|
-
<% values["methods"].each do |methods| %>
|
543
|
-
<%= href methods["aref"], methods["name"] %>
|
544
|
-
<% end %><%# values["methods"] %>
|
545
|
-
</div>
|
546
|
-
</div>
|
547
|
-
<% end %>
|
67
|
+
CLASS_PAGE = RDoc::Generator::HTML::HTML::CLASS_PAGE
|
548
68
|
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
<!-- if includes -->
|
553
|
-
<% if values["includes"] then %>
|
554
|
-
<div id="includes">
|
555
|
-
<h3 class="section-bar">Included Modules</h3>
|
556
|
-
|
557
|
-
<div id="includes-list">
|
558
|
-
<% values["includes"].each do |includes| %>
|
559
|
-
<span class="include-name"><%= href includes["aref"], includes["name"] %></span>
|
560
|
-
<% end %><%# values["includes"] %>
|
561
|
-
</div>
|
562
|
-
</div>
|
563
|
-
<% end %>
|
564
|
-
|
565
|
-
<% values["sections"].each do |sections| %>
|
566
|
-
<div id="section">
|
567
|
-
<% if sections["sectitle"] then %>
|
568
|
-
<h2 class="section-title"><a name="<%= sections["secsequence"] %>"><%= sections["sectitle"] %></a></h2>
|
569
|
-
<% if sections["seccomment"] then %>
|
570
|
-
<div class="section-comment">
|
571
|
-
<%= sections["seccomment"] %>
|
572
|
-
</div>
|
573
|
-
<% end %>
|
574
|
-
<% end %>
|
575
|
-
|
576
|
-
<% if values["classlist"] then %>
|
577
|
-
<div id="class-list">
|
578
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
579
|
-
|
580
|
-
<%= values["classlist"] %>
|
581
|
-
</div>
|
582
|
-
<% end %>
|
583
|
-
|
584
|
-
<% if values["constants"] then %>
|
585
|
-
<div id="constants-list">
|
586
|
-
<h3 class="section-bar">Constants</h3>
|
587
|
-
|
588
|
-
<div class="name-list">
|
589
|
-
<table summary="Constants">
|
590
|
-
<% values["constants"].each do |constants| %>
|
591
|
-
<tr class="top-aligned-row context-row">
|
592
|
-
<td class="context-item-name"><%= constants["name"] %></td>
|
593
|
-
<td>=</td>
|
594
|
-
<td class="context-item-value"><%= constants["value"] %></td>
|
595
|
-
<% if values["desc"] then %>
|
596
|
-
<td width="3em"> </td>
|
597
|
-
<td class="context-item-desc"><%= constants["desc"] %></td>
|
598
|
-
<% end %>
|
599
|
-
</tr>
|
600
|
-
<% end %><%# values["constants"] %>
|
601
|
-
</table>
|
602
|
-
</div>
|
603
|
-
</div>
|
604
|
-
<% end %>
|
605
|
-
|
606
|
-
<% if values["aliases"] then %>
|
607
|
-
<div id="aliases-list">
|
608
|
-
<h3 class="section-bar">External Aliases</h3>
|
609
|
-
|
610
|
-
<div class="name-list">
|
611
|
-
<table summary="aliases">
|
612
|
-
<% values["aliases"].each do |aliases| $stderr.puts({ :aliases => aliases }.inspect) %>
|
613
|
-
<tr class="top-aligned-row context-row">
|
614
|
-
<td class="context-item-name"><%= values["old_name"] %></td>
|
615
|
-
<td>-></td>
|
616
|
-
<td class="context-item-value"><%= values["new_name"] %></td>
|
617
|
-
</tr>
|
618
|
-
<% if values["desc"] then %>
|
619
|
-
<tr class="top-aligned-row context-row">
|
620
|
-
<td> </td>
|
621
|
-
<td colspan="2" class="context-item-desc"><%= values["desc"] %></td>
|
622
|
-
</tr>
|
623
|
-
<% end %>
|
624
|
-
<% end %><%# values["aliases"] %>
|
625
|
-
</table>
|
626
|
-
</div>
|
627
|
-
</div>
|
628
|
-
<% end %>
|
629
|
-
|
630
|
-
|
631
|
-
<% if values["attributes"] then %>
|
632
|
-
<div id="attribute-list">
|
633
|
-
<h3 class="section-bar">Attributes</h3>
|
634
|
-
|
635
|
-
<div class="name-list">
|
636
|
-
<table>
|
637
|
-
<% values["attributes"].each do |attributes| $stderr.puts({ :attributes => attributes }.inspect) %>
|
638
|
-
<tr class="top-aligned-row context-row">
|
639
|
-
<td class="context-item-name"><%= values["name"] %></td>
|
640
|
-
<% if values["rw"] then %>
|
641
|
-
<td class="context-item-value"> [<%= values["rw"] %>] </td>
|
642
|
-
<% end %>
|
643
|
-
<% unless values["rw"] then %>
|
644
|
-
<td class="context-item-value"> </td>
|
645
|
-
<% end %>
|
646
|
-
<td class="context-item-desc"><%= values["a_desc"] %></td>
|
647
|
-
</tr>
|
648
|
-
<% end %><%# values["attributes"] %>
|
649
|
-
</table>
|
650
|
-
</div>
|
651
|
-
</div>
|
652
|
-
<% end %>
|
653
|
-
|
654
|
-
<!-- if method_list -->
|
655
|
-
<% if sections["method_list"] then %>
|
656
|
-
<div id="methods">
|
657
|
-
<% sections["method_list"].each do |method_list| %>
|
658
|
-
<% if method_list["methods"] then %>
|
659
|
-
<h3 class="section-bar"><%= method_list["type"] %> <%= method_list["category"] %> methods</h3>
|
660
|
-
|
661
|
-
<% method_list["methods"].each do |methods| %>
|
662
|
-
<div id="method-<%= methods["aref"] %>" class="method-detail">
|
663
|
-
<a name="<%= methods["aref"] %>"></a>
|
664
|
-
|
665
|
-
<div class="method-heading">
|
666
|
-
<% if methods["codeurl"] then %>
|
667
|
-
<a href="<%= methods["codeurl"] %>" target="Code" class="method-signature"
|
668
|
-
onclick="popupCode('<%= methods["codeurl"] %>');return false;">
|
669
|
-
<% end %>
|
670
|
-
<% if methods["sourcecode"] then %>
|
671
|
-
<a href="#<%= methods["aref"] %>" class="method-signature">
|
672
|
-
<% end %>
|
673
|
-
<% if methods["callseq"] then %>
|
674
|
-
<span class="method-name"><%= methods["callseq"] %></span>
|
675
|
-
<% end %>
|
676
|
-
<% unless methods["callseq"] then %>
|
677
|
-
<span class="method-name"><%= methods["name"] %></span><span class="method-args"><%= methods["params"] %></span>
|
678
|
-
<% end %>
|
679
|
-
<% if methods["codeurl"] then %>
|
680
|
-
</a>
|
681
|
-
<% end %>
|
682
|
-
<% if methods["sourcecode"] then %>
|
683
|
-
</a>
|
684
|
-
<% end %>
|
685
|
-
</div>
|
686
|
-
|
687
|
-
<div class="method-description">
|
688
|
-
<% if methods["m_desc"] then %>
|
689
|
-
<%= methods["m_desc"] %>
|
690
|
-
<% end %>
|
691
|
-
<% if methods["sourcecode"] then %>
|
692
|
-
<p><a class="source-toggle" href="#"
|
693
|
-
onclick="toggleCode('<%= methods["aref"] %>-source');return false;">[Source]</a></p>
|
694
|
-
<div class="method-source-code" id="<%= methods["aref"] %>-source">
|
695
|
-
<pre>
|
696
|
-
<%= methods["sourcecode"] %>
|
697
|
-
</pre>
|
698
|
-
</div>
|
699
|
-
<% end %>
|
700
|
-
</div>
|
701
|
-
</div>
|
702
|
-
|
703
|
-
<% end %><%# method_list["methods"] %>
|
704
|
-
<% end %>
|
705
|
-
<% end %><%# sections["method_list"] %>
|
706
|
-
|
707
|
-
</div>
|
708
|
-
<% end %>
|
709
|
-
<% end %><%# values["sections"] %>
|
710
|
-
EOF
|
711
|
-
|
712
|
-
##
|
713
|
-
# Body template
|
69
|
+
METHOD_LIST = RDoc::Generator::HTML::HTML::METHOD_LIST
|
714
70
|
|
715
71
|
BODY = HEADER + %{
|
716
72
|
|
@@ -724,72 +80,13 @@ EOF
|
|
724
80
|
|
725
81
|
} + FOOTER
|
726
82
|
|
727
|
-
|
728
|
-
# Source code template
|
729
|
-
|
730
|
-
SRC_PAGE = XHTML_PREAMBLE + <<-EOF
|
731
|
-
<html>
|
732
|
-
<head>
|
733
|
-
<title><%= values["title"] %></title>
|
734
|
-
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
735
|
-
<link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
|
736
|
-
</head>
|
737
|
-
<body class="standalone-code">
|
738
|
-
<pre><%= values["code"] %></pre>
|
739
|
-
</body>
|
740
|
-
</html>
|
741
|
-
EOF
|
742
|
-
|
743
|
-
##
|
744
|
-
# Index file templates
|
745
|
-
|
746
|
-
FR_INDEX_BODY = %{
|
747
|
-
<%= template_include %>
|
748
|
-
}
|
83
|
+
SRC_PAGE = RDoc::Generator::HTML::HTML::SRC_PAGE
|
749
84
|
|
750
|
-
|
751
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
752
|
-
<head>
|
753
|
-
<title><%= values["list_title"] %></title>
|
754
|
-
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
755
|
-
<link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" />
|
756
|
-
<base target="docwin" />
|
757
|
-
</head>
|
758
|
-
<body>
|
759
|
-
<div class="index">
|
760
|
-
<h1 class="section-bar"><%= values["list_title"] %></h1>
|
761
|
-
<div class="index-entries">
|
762
|
-
<% values["entries"].each do |entries| %>
|
763
|
-
<a href="<%= entries["href"] %>"><%= entries["name"] %></a><br />
|
764
|
-
<% end %><%# values["entries"] %>
|
765
|
-
</div>
|
766
|
-
</div>
|
767
|
-
</body>
|
768
|
-
</html>
|
769
|
-
EOF
|
85
|
+
FR_INDEX_BODY = RDoc::Generator::HTML::HTML::FR_INDEX_BODY
|
770
86
|
|
771
|
-
|
772
|
-
METHOD_INDEX = FILE_INDEX
|
87
|
+
FILE_INDEX = RDoc::Generator::HTML::HTML::FILE_INDEX
|
773
88
|
|
774
|
-
|
775
|
-
<?xml version="1.0" encoding="<%= values["charset"] %>"?>
|
776
|
-
<!DOCTYPE html
|
777
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
778
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
779
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
780
|
-
<head>
|
781
|
-
<title><%= values["title"] %></title>
|
782
|
-
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
783
|
-
</head>
|
784
|
-
<frameset rows="20%, 80%">
|
785
|
-
<frameset cols="45%,55%">
|
786
|
-
<frame src="fr_class_index.html" name="Classes" />
|
787
|
-
<frame src="fr_method_index.html" name="Methods" />
|
788
|
-
</frameset>
|
789
|
-
<frame src="<%= values["initial_page"] %>" name="docwin" />
|
790
|
-
</frameset>
|
791
|
-
</html>
|
792
|
-
EOF
|
89
|
+
CLASS_INDEX = RDoc::Generator::HTML::HTML::CLASS_INDEX
|
793
90
|
|
91
|
+
METHOD_INDEX = RDoc::Generator::HTML::HTML::METHOD_INDEX
|
794
92
|
end
|
795
|
-
|