rdoc 2.2.1 → 2.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.

Files changed (95) hide show
  1. data.tar.gz.sig +2 -0
  2. data/.document +4 -0
  3. data/History.txt +35 -0
  4. data/Manifest.txt +36 -15
  5. data/README.txt +11 -27
  6. data/Rakefile +3 -0
  7. data/lib/rdoc.rb +1 -1
  8. data/lib/rdoc/cache.rb +32 -0
  9. data/lib/rdoc/code_objects.rb +121 -59
  10. data/lib/rdoc/generator.rb +196 -133
  11. data/lib/rdoc/generator/darkfish.rb +471 -0
  12. data/lib/rdoc/generator/html.rb +71 -60
  13. data/lib/rdoc/generator/html/html.rb +115 -115
  14. data/lib/rdoc/generator/html/one_page_html.rb +56 -56
  15. data/lib/rdoc/generator/ri.rb +2 -0
  16. data/lib/rdoc/generator/template/darkfish/.document +0 -0
  17. data/lib/rdoc/generator/template/darkfish/classpage.rhtml +302 -0
  18. data/lib/rdoc/generator/template/darkfish/filepage.rhtml +114 -0
  19. data/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
  20. data/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  21. data/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
  22. data/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  23. data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  24. data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  25. data/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
  26. data/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
  27. data/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  28. data/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  29. data/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
  30. data/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  31. data/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  32. data/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  33. data/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  34. data/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  35. data/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  36. data/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  37. data/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  38. data/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  39. data/lib/rdoc/generator/template/darkfish/index.rhtml +57 -0
  40. data/lib/rdoc/generator/template/darkfish/js/darkfish.js +116 -0
  41. data/lib/rdoc/generator/template/darkfish/js/jquery.js +32 -0
  42. data/lib/rdoc/generator/template/darkfish/js/quicksearch.js +114 -0
  43. data/lib/rdoc/generator/template/darkfish/js/thickbox-compressed.js +10 -0
  44. data/lib/rdoc/generator/template/darkfish/rdoc.css +696 -0
  45. data/lib/rdoc/generator/xml.rb +19 -12
  46. data/lib/rdoc/generator/xml/rdf.rb +50 -50
  47. data/lib/rdoc/generator/xml/xml.rb +58 -58
  48. data/lib/rdoc/known_classes.rb +0 -1
  49. data/lib/rdoc/markup/preprocess.rb +4 -3
  50. data/lib/rdoc/markup/to_html.rb +4 -1
  51. data/lib/rdoc/markup/to_html_crossref.rb +28 -31
  52. data/lib/rdoc/options.rb +25 -20
  53. data/lib/rdoc/parser.rb +10 -2
  54. data/lib/rdoc/parser/c.rb +38 -29
  55. data/lib/rdoc/parser/f95.rb +32 -32
  56. data/lib/rdoc/parser/ruby.rb +5 -2
  57. data/lib/rdoc/parser/simple.rb +1 -0
  58. data/lib/rdoc/rdoc.rb +99 -47
  59. data/lib/rdoc/ri/cache.rb +6 -6
  60. data/lib/rdoc/ri/display.rb +22 -75
  61. data/lib/rdoc/ri/driver.rb +237 -78
  62. data/lib/rdoc/stats.rb +91 -28
  63. data/lib/rdoc/template.rb +6 -2
  64. data/test/test.ja.rdoc +8 -0
  65. data/test/test.ja.txt +8 -0
  66. data/test/test_attribute_manager.rb +9 -6
  67. data/test/test_rdoc_markup.rb +4 -2
  68. data/test/test_rdoc_markup_attribute_manager.rb +13 -3
  69. data/test/test_rdoc_markup_to_html.rb +18 -2
  70. data/test/test_rdoc_markup_to_html_crossref.rb +186 -249
  71. data/test/test_rdoc_parser.rb +17 -1
  72. data/test/test_rdoc_parser_c.rb +65 -10
  73. data/test/test_rdoc_parser_perl.rb +4 -2
  74. data/test/test_rdoc_parser_ruby.rb +6 -4
  75. data/test/test_rdoc_ri_attribute_formatter.rb +4 -2
  76. data/test/test_rdoc_ri_default_display.rb +8 -4
  77. data/test/test_rdoc_ri_driver.rb +4 -2
  78. data/test/test_rdoc_ri_formatter.rb +6 -4
  79. data/test/test_rdoc_ri_overstrike_formatter.rb +4 -2
  80. metadata +84 -33
  81. metadata.gz.sig +0 -0
  82. data/lib/rdoc/generator/chm.rb +0 -113
  83. data/lib/rdoc/generator/chm/chm.rb +0 -100
  84. data/lib/rdoc/generator/html/frameless.rb +0 -92
  85. data/lib/rdoc/generator/html/hefss.rb +0 -150
  86. data/lib/rdoc/generator/html/kilmer.rb +0 -151
  87. data/lib/rdoc/generator/html/kilmerfactory.rb +0 -427
  88. data/lib/rdoc/generator/texinfo.rb +0 -81
  89. data/lib/rdoc/generator/texinfo/class.texinfo.erb +0 -44
  90. data/lib/rdoc/generator/texinfo/file.texinfo.erb +0 -6
  91. data/lib/rdoc/generator/texinfo/method.texinfo.erb +0 -6
  92. data/lib/rdoc/generator/texinfo/texinfo.erb +0 -28
  93. data/test/rdoc_markup_to_html_crossref_reference.rb +0 -31
  94. data/test/test_rdoc_info_formatting.rb +0 -175
  95. data/test/test_rdoc_info_sections.rb +0 -136
@@ -2,6 +2,7 @@ require 'fileutils'
2
2
 
3
3
  require 'rdoc/generator'
4
4
  require 'rdoc/markup/to_html'
5
+ require 'rdoc/cache'
5
6
 
6
7
  ##
7
8
  # We're responsible for generating all the HTML files from the object tree
@@ -40,6 +41,8 @@ require 'rdoc/markup/to_html'
40
41
 
41
42
  class RDoc::Generator::HTML
42
43
 
44
+ RDoc::RDoc.add_generator self
45
+
43
46
  include RDoc::Generator::MarkUp
44
47
 
45
48
  ##
@@ -79,6 +82,7 @@ class RDoc::Generator::HTML
79
82
  @toplevels = toplevels
80
83
  @files = []
81
84
  @classes = []
85
+ @template_cache = RDoc::Cache.instance
82
86
 
83
87
  write_style_sheet
84
88
  gen_sub_directories
@@ -89,23 +93,22 @@ class RDoc::Generator::HTML
89
93
  private
90
94
 
91
95
  ##
92
- # Load up the HTML template specified in the options.
93
- # If the template name contains a slash, use it literally
96
+ # Load up the HTML template specified in the options. If the template name
97
+ # contains a slash, use it literally.
98
+ #
99
+ # If the template is not a path, first look for it in rdoc's HTML template
100
+ # directory. Perhaps this behavior should be reversed (first try to include
101
+ # the template and, only if that fails, try to include it in the default
102
+ # template directory). One danger with reversing the behavior, however, is
103
+ # that if something like require 'html' could load up an unrelated file in
104
+ # the standard library or in a gem.
94
105
 
95
106
  def load_html_template
96
- #
97
- # If the template is not a path, first look for it
98
- # in rdoc's HTML template directory. Perhaps this behavior should
99
- # be reversed (first try to include the template and, only if that
100
- # fails, try to include it in the default template directory).
101
- # One danger with reversing the behavior, however, is that
102
- # if something like require 'html' could load up an
103
- # unrelated file in the standard library or in a gem.
104
- #
105
107
  template = @options.template
106
108
 
107
109
  unless template =~ %r{/|\\} then
108
- template = File.join('rdoc', 'generator', @options.generator.key,
110
+ generator_name = @options.generator.name.sub(/^RDoc::Generator::/, '')
111
+ template = File.join('rdoc', 'generator', generator_name.downcase,
109
112
  template)
110
113
  end
111
114
 
@@ -115,11 +118,9 @@ class RDoc::Generator::HTML
115
118
  @template = self.class.const_get @options.template.upcase
116
119
  @options.template_class = @template
117
120
  rescue LoadError => e
118
- #
119
121
  # The template did not exist in the default template directory, so
120
122
  # see if require can find the template elsewhere (in a gem, for
121
123
  # instance).
122
- #
123
124
  if(e.message[template] && template != @options.template)
124
125
  template = @options.template
125
126
  retry
@@ -145,7 +146,7 @@ class RDoc::Generator::HTML
145
146
 
146
147
  if @template.constants.include? :FONTS or
147
148
  @template.constants.include? 'FONTS' then
148
- values["fonts"] = @template::FONTS
149
+ values[:fonts] = @template::FONTS
149
150
  end
150
151
 
151
152
  template.write_html_on(f, values)
@@ -166,7 +167,8 @@ class RDoc::Generator::HTML
166
167
 
167
168
  def build_indices
168
169
  @files, @classes = RDoc::Generator::Context.build_indices(@toplevels,
169
- @options)
170
+ @options,
171
+ @template_cache)
170
172
  end
171
173
 
172
174
  ##
@@ -174,6 +176,9 @@ class RDoc::Generator::HTML
174
176
 
175
177
  def generate_html
176
178
  @main_url = main_url
179
+ @sorted_files = @files.sort
180
+ @sorted_classes = @classes.sort
181
+ @sorted_methods = RDoc::Generator::Method.all_methods.sort
177
182
 
178
183
  # the individual descriptions for files and classes
179
184
  gen_into(@files)
@@ -187,12 +192,13 @@ class RDoc::Generator::HTML
187
192
 
188
193
  # this method is defined in the template file
189
194
  values = {
190
- 'title_suffix' => CGI.escapeHTML("[#{@options.title}]"),
191
- 'charset' => @options.charset,
192
- 'style_url' => style_url('', @options.css),
195
+ :title_suffix => CGI.escapeHTML("[#{@options.title}]"),
196
+ :charset => @options.charset,
197
+ :style_url => style_url('', @options.css),
193
198
  }
194
199
 
195
- @template.write_extra_pages(values) if @template.respond_to?(:write_extra_pages)
200
+ @template.write_extra_pages(values) if
201
+ @template.respond_to?(:write_extra_pages)
196
202
  end
197
203
 
198
204
  def gen_into(list)
@@ -213,16 +219,23 @@ class RDoc::Generator::HTML
213
219
  method_list = {}
214
220
  prev_op_dir = nil
215
221
 
216
- list.each do |item|
222
+ # Extra optimization: sort the list based on item directories, to minimize
223
+ # the number of times the directory changes. This reduces runtime by about
224
+ # 8% on RDoc's own sources.
225
+ sorted_list = list.sort do |a, b|
226
+ File.dirname(a.path) <=> File.dirname(b.path)
227
+ end
228
+
229
+ sorted_list.each do |item|
217
230
  next unless item.document_self
218
231
 
219
232
  op_file = item.path
220
233
  op_dir = File.dirname(op_file)
221
234
 
222
235
  if(op_dir != prev_op_dir)
223
- file_list = index_to_links op_file, @files
224
- class_list = index_to_links op_file, @classes
225
- method_list = index_to_links op_file, RDoc::Generator::Method.all_methods
236
+ file_list = index_to_links op_file, @sorted_files
237
+ class_list = index_to_links op_file, @sorted_classes
238
+ method_list = index_to_links op_file, @sorted_methods
226
239
  end
227
240
  prev_op_dir = op_dir
228
241
 
@@ -253,17 +266,17 @@ class RDoc::Generator::HTML
253
266
  res = []
254
267
  collection.sort.each do |f|
255
268
  if f.document_self
256
- res << { "href" => f.path, "name" => f.index_name }
269
+ res << { :href => f.path, :name => f.index_name }
257
270
  end
258
271
  end
259
272
 
260
273
  values = {
261
- "entries" => res,
262
- 'title' => CGI.escapeHTML("#{title} [#{@options.title}]"),
263
- 'list_title' => CGI.escapeHTML(title),
264
- 'index_url' => @main_url,
265
- 'charset' => @options.charset,
266
- 'style_url' => style_url('', @options.css),
274
+ :entries => res,
275
+ :title => CGI.escapeHTML("#{title} [#{@options.title}]"),
276
+ :list_title => CGI.escapeHTML(title),
277
+ :index_url => @main_url,
278
+ :charset => @options.charset,
279
+ :style_url => style_url('', @options.css),
267
280
  }
268
281
 
269
282
  open filename, 'w' do |f|
@@ -305,30 +318,32 @@ class RDoc::Generator::HTML
305
318
 
306
319
  open 'index.html', 'w' do |f|
307
320
  style_url = style_url '', @options.css
308
-
321
+
309
322
  classes = @classes.sort.map { |klass| klass.value_hash }
310
-
323
+
311
324
  values = {
312
- 'initial_page' => @main_url,
313
- 'style_url' => style_url('', @options.css),
314
- 'title' => CGI.escapeHTML(@options.title),
315
- 'charset' => @options.charset,
316
- 'classes' => classes,
325
+ :initial_page => @main_url,
326
+ :style_url => style_url('', @options.css),
327
+ :title => CGI.escapeHTML(@options.title),
328
+ :charset => @options.charset,
329
+ :classes => classes,
317
330
  }
318
-
319
- values['inline_source'] = @options.inline_source
331
+
332
+ values[:inline_source] = @options.inline_source
320
333
 
321
334
  main.write_html_on f, values
322
335
  end
323
336
  end
324
337
  end
325
338
 
326
- def index_to_links(output_path, collection)
327
- collection.sort.map do |f|
339
+ def index_to_links(output_path, sorted_collection)
340
+ result = sorted_collection.map do |f|
328
341
  next unless f.document_self
329
- { "href" => RDoc::Markup::ToHtml.gen_relative_url(output_path, f.path),
330
- "name" => f.index_name }
331
- end.compact
342
+ { :href => RDoc::Markup::ToHtml.gen_relative_url(output_path, f.path),
343
+ :name => f.index_name }
344
+ end
345
+ result.compact!
346
+ result
332
347
  end
333
348
 
334
349
  ##
@@ -356,9 +371,7 @@ class RDoc::Generator::HTML
356
371
  # No main page has been specified, so just use the README.
357
372
  #
358
373
  @files.each do |file|
359
- if file.name =~ /^README/ then
360
- return file.path
361
- end
374
+ return file.path if file.name =~ /^README/
362
375
  end
363
376
 
364
377
  #
@@ -366,9 +379,7 @@ class RDoc::Generator::HTML
366
379
  # that will be documented.
367
380
  #
368
381
  @files.each do |file|
369
- if file.document_self then
370
- return file.path
371
- end
382
+ return file.path if file.document_self
372
383
  end
373
384
 
374
385
  #
@@ -419,19 +430,19 @@ class RDoc::Generator::HTMLInOne < RDoc::Generator::HTML
419
430
 
420
431
  def generate_xml
421
432
  values = {
422
- 'charset' => @options.charset,
423
- 'files' => gen_into(@files),
424
- 'classes' => gen_into(@classes),
425
- 'title' => CGI.escapeHTML(@options.title),
433
+ :charset => @options.charset,
434
+ :files => gen_into(@files),
435
+ :classes => gen_into(@classes),
436
+ :title => CGI.escapeHTML(@options.title),
426
437
  }
427
438
 
428
439
  template = RDoc::TemplatePage.new @template::ONE_PAGE
429
440
 
430
- if @options.op_name
431
- opfile = open @options.op_name, 'w'
432
- else
433
- opfile = $stdout
434
- end
441
+ opfile = if @options.op_name then
442
+ open @options.op_name, 'w'
443
+ else
444
+ $stdout
445
+ end
435
446
  template.write_html_on(opfile, values)
436
447
  end
437
448
 
@@ -338,10 +338,10 @@ EOF
338
338
 
339
339
  HEADER = XHTML_STRICT_PREAMBLE + HTML_ELEMENT + <<-EOF
340
340
  <head>
341
- <title><%= values["title"] %></title>
342
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
341
+ <title><%= values[:title] %></title>
342
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= values[:charset] %>" />
343
343
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
344
- <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
344
+ <link rel="stylesheet" href="<%= values[:style_url] %>" type="text/css" media="screen" />
345
345
  <script type="text/javascript">
346
346
  // <![CDATA[
347
347
 
@@ -398,19 +398,19 @@ EOF
398
398
 
399
399
  FILE_PAGE = <<-EOF
400
400
  <div id="fileHeader">
401
- <h1><%= values["short_name"] %></h1>
401
+ <h1><%= values[:short_name] %></h1>
402
402
  <table class="header-table">
403
403
  <tr class="top-aligned-row">
404
404
  <td><strong>Path:</strong></td>
405
- <td><%= values["full_path"] %>
406
- <% if values["cvsurl"] then %>
407
- &nbsp;(<a href="<%= values["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
405
+ <td><%= values[:full_path] %>
406
+ <% if values[:cvsurl] then %>
407
+ &nbsp;(<a href="<%= values[:cvsurl] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
408
408
  <% end %>
409
409
  </td>
410
410
  </tr>
411
411
  <tr class="top-aligned-row">
412
412
  <td><strong>Last Update:</strong></td>
413
- <td><%= values["dtm_modified"] %></td>
413
+ <td><%= values[:dtm_modified] %></td>
414
414
  </tr>
415
415
  </table>
416
416
  </div>
@@ -424,37 +424,37 @@ EOF
424
424
  <div id="classHeader">
425
425
  <table class="header-table">
426
426
  <tr class="top-aligned-row">
427
- <td><strong><%= values["classmod"] %></strong></td>
428
- <td class="class-name-in-header"><%= values["full_name"] %></td>
427
+ <td><strong><%= values[:classmod] %></strong></td>
428
+ <td class="class-name-in-header"><%= values[:full_name] %></td>
429
429
  </tr>
430
430
  <tr class="top-aligned-row">
431
431
  <td><strong>In:</strong></td>
432
432
  <td>
433
- <% values["infiles"].each do |infiles| %>
434
- <% if infiles["full_path_url"] then %>
435
- <a href="<%= infiles["full_path_url"] %>">
433
+ <% values[:infiles].each do |infiles| %>
434
+ <% if infiles[:full_path_url] then %>
435
+ <a href="<%= infiles[:full_path_url] %>">
436
436
  <% end %>
437
- <%= infiles["full_path"] %>
438
- <% if infiles["full_path_url"] then %>
437
+ <%= infiles[:full_path] %>
438
+ <% if infiles[:full_path_url] then %>
439
439
  </a>
440
440
  <% end %>
441
- <% if infiles["cvsurl"] then %>
442
- &nbsp;(<a href="<%= infiles["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
441
+ <% if infiles[:cvsurl] then %>
442
+ &nbsp;(<a href="<%= infiles[:cvsurl] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
443
443
  <% end %>
444
444
  <br />
445
- <% end %><%# values["infiles"] %>
445
+ <% end %><%# values[:infiles] %>
446
446
  </td>
447
447
  </tr>
448
448
 
449
- <% if values["parent"] then %>
449
+ <% if values[:parent] then %>
450
450
  <tr class="top-aligned-row">
451
451
  <td><strong>Parent:</strong></td>
452
452
  <td>
453
- <% if values["par_url"] then %>
454
- <a href="<%= values["par_url"] %>">
453
+ <% if values[:par_url] then %>
454
+ <a href="<%= values[:par_url] %>">
455
455
  <% end %>
456
- <%= values["parent"] %>
457
- <% if values["par_url"] then %>
456
+ <%= values[:parent] %>
457
+ <% if values[:par_url] then %>
458
458
  </a>
459
459
  <% end %>
460
460
  </td>
@@ -470,211 +470,211 @@ EOF
470
470
 
471
471
  METHOD_LIST = <<-EOF
472
472
  <div id="contextContent">
473
- <% if values["diagram"] then %>
473
+ <% if values[:diagram] then %>
474
474
  <div id="diagram">
475
- <%= values["diagram"] %>
475
+ <%= values[:diagram] %>
476
476
  </div>
477
477
  <% end
478
478
 
479
- if values["description"] then %>
479
+ if values[:description] then %>
480
480
  <div id="description">
481
- <%= values["description"] %>
481
+ <%= values[:description] %>
482
482
  </div>
483
483
  <% end
484
484
 
485
- if values["requires"] then %>
485
+ if values[:requires] then %>
486
486
  <div id="requires-list">
487
487
  <h3 class="section-bar">Required files</h3>
488
488
 
489
489
  <div class="name-list">
490
- <% values["requires"].each do |requires| %>
491
- <%= href requires["aref"], requires["name"] %>&nbsp;&nbsp;
492
- <% end %><%# values["requires"] %>
490
+ <% values[:requires].each do |requires| %>
491
+ <%= href requires[:aref], requires[:name] %>&nbsp;&nbsp;
492
+ <% end %><%# values[:requires] %>
493
493
  </div>
494
494
  </div>
495
495
  <% end
496
496
 
497
- if values["toc"] then %>
497
+ if values[:toc] then %>
498
498
  <div id="contents-list">
499
499
  <h3 class="section-bar">Contents</h3>
500
500
  <ul>
501
- <% values["toc"].each do |toc| %>
502
- <li><a href="#<%= toc["href"] %>"><%= toc["secname"] %></a></li>
503
- <% end %><%# values["toc"] %>
501
+ <% values[:toc].each do |toc| %>
502
+ <li><a href="#<%= toc[:href] %>"><%= toc[:secname] %></a></li>
503
+ <% end %><%# values[:toc] %>
504
504
  </ul>
505
505
  <% end %>
506
506
  </div>
507
507
 
508
- <% if values["methods"] then %>
508
+ <% if values[:methods] then %>
509
509
  <div id="method-list">
510
510
  <h3 class="section-bar">Methods</h3>
511
511
 
512
512
  <div class="name-list">
513
- <% values["methods"].each do |methods| %>
514
- <%= href methods["aref"], methods["name"] %>&nbsp;&nbsp;
515
- <% end %><%# values["methods"] %>
513
+ <% values[:methods].each do |methods| %>
514
+ <%= href methods[:aref], methods[:name] %>&nbsp;&nbsp;
515
+ <% end %><%# values[:methods] %>
516
516
  </div>
517
517
  </div>
518
518
  <% end %>
519
519
  </div>
520
520
 
521
521
  <!-- if includes -->
522
- <% if values["includes"] then %>
522
+ <% if values[:includes] then %>
523
523
  <div id="includes">
524
524
  <h3 class="section-bar">Included Modules</h3>
525
525
 
526
526
  <div id="includes-list">
527
- <% values["includes"].each do |includes| %>
528
- <span class="include-name"><%= href includes["aref"], includes["name"] %></span>
529
- <% end %><%# values["includes"] %>
527
+ <% values[:includes].each do |includes| %>
528
+ <span class="include-name"><%= href includes[:aref], includes[:name] %></span>
529
+ <% end %><%# values[:includes] %>
530
530
  </div>
531
531
  </div>
532
532
  <% end
533
533
 
534
- values["sections"].each do |sections| %>
534
+ values[:sections].each do |sections| %>
535
535
  <div id="section">
536
- <% if sections["sectitle"] then %>
537
- <h2 class="section-title"><a name="<%= sections["secsequence"] %>"><%= sections["sectitle"] %></a></h2>
538
- <% if sections["seccomment"] then %>
536
+ <% if sections[:sectitle] then %>
537
+ <h2 class="section-title"><a name="<%= sections[:secsequence] %>"><%= sections[:sectitle] %></a></h2>
538
+ <% if sections[:seccomment] then %>
539
539
  <div class="section-comment">
540
- <%= sections["seccomment"] %>
540
+ <%= sections[:seccomment] %>
541
541
  </div>
542
542
  <% end
543
543
  end
544
544
 
545
- if sections["classlist"] then %>
545
+ if sections[:classlist] then %>
546
546
  <div id="class-list">
547
547
  <h3 class="section-bar">Classes and Modules</h3>
548
548
 
549
- <%= sections["classlist"] %>
549
+ <%= sections[:classlist] %>
550
550
  </div>
551
551
  <% end
552
552
 
553
- if sections["constants"] then %>
553
+ if sections[:constants] then %>
554
554
  <div id="constants-list">
555
555
  <h3 class="section-bar">Constants</h3>
556
556
 
557
557
  <div class="name-list">
558
558
  <table summary="Constants">
559
- <% sections["constants"].each do |constants| %>
559
+ <% sections[:constants].each do |constants| %>
560
560
  <tr class="top-aligned-row context-row">
561
- <td class="context-item-name"><%= constants["name"] %></td>
561
+ <td class="context-item-name"><%= constants[:name] %></td>
562
562
  <td>=</td>
563
- <td class="context-item-value"><%= constants["value"] %></td>
564
- <% if constants["desc"] then %>
563
+ <td class="context-item-value"><%= constants[:value] %></td>
564
+ <% if constants[:desc] then %>
565
565
  <td>&nbsp;</td>
566
- <td class="context-item-desc"><%= constants["desc"] %></td>
566
+ <td class="context-item-desc"><%= constants[:desc] %></td>
567
567
  <% end %>
568
568
  </tr>
569
- <% end %><%# sections["constants"] %>
569
+ <% end %><%# sections[:constants] %>
570
570
  </table>
571
571
  </div>
572
572
  </div>
573
573
  <% end
574
574
 
575
- if sections["aliases"] then %>
575
+ if sections[:aliases] then %>
576
576
  <div id="aliases-list">
577
577
  <h3 class="section-bar">External Aliases</h3>
578
578
 
579
579
  <div class="name-list">
580
580
  <table summary="aliases">
581
- <% sections["aliases"].each do |aliases| %>
581
+ <% sections[:aliases].each do |aliases| %>
582
582
  <tr class="top-aligned-row context-row">
583
- <td class="context-item-name"><%= aliases["old_name"] %></td>
583
+ <td class="context-item-name"><%= aliases[:old_name] %></td>
584
584
  <td>-&gt;</td>
585
- <td class="context-item-value"><%= aliases["new_name"] %></td>
585
+ <td class="context-item-value"><%= aliases[:new_name] %></td>
586
586
  </tr>
587
- <% if aliases["desc"] then %>
587
+ <% if aliases[:desc] then %>
588
588
  <tr class="top-aligned-row context-row">
589
589
  <td>&nbsp;</td>
590
- <td colspan="2" class="context-item-desc"><%= aliases["desc"] %></td>
590
+ <td colspan="2" class="context-item-desc"><%= aliases[:desc] %></td>
591
591
  </tr>
592
592
  <% end
593
- end %><%# sections["aliases"] %>
593
+ end %><%# sections[:aliases] %>
594
594
  </table>
595
595
  </div>
596
596
  </div>
597
597
  <% end %>
598
598
 
599
- <% if sections["attributes"] then %>
599
+ <% if sections[:attributes] then %>
600
600
  <div id="attribute-list">
601
601
  <h3 class="section-bar">Attributes</h3>
602
602
 
603
603
  <div class="name-list">
604
604
  <table>
605
- <% sections["attributes"].each do |attribute| %>
605
+ <% sections[:attributes].each do |attribute| %>
606
606
  <tr class="top-aligned-row context-row">
607
- <td class="context-item-name"><%= attribute["name"] %></td>
608
- <% if attribute["rw"] then %>
609
- <td class="context-item-value">&nbsp;[<%= attribute["rw"] %>]&nbsp;</td>
607
+ <td class="context-item-name"><%= attribute[:name] %></td>
608
+ <% if attribute[:rw] then %>
609
+ <td class="context-item-value">&nbsp;[<%= attribute[:rw] %>]&nbsp;</td>
610
610
  <% end
611
- unless attribute["rw"] then %>
611
+ unless attribute[:rw] then %>
612
612
  <td class="context-item-value">&nbsp;&nbsp;</td>
613
613
  <% end %>
614
- <td class="context-item-desc"><%= attribute["a_desc"] %></td>
614
+ <td class="context-item-desc"><%= attribute[:a_desc] %></td>
615
615
  </tr>
616
- <% end %><%# sections["attributes"] %>
616
+ <% end %><%# sections[:attributes] %>
617
617
  </table>
618
618
  </div>
619
619
  </div>
620
620
  <% end %>
621
621
 
622
622
  <!-- if method_list -->
623
- <% if sections["method_list"] then %>
623
+ <% if sections[:method_list] then %>
624
624
  <div id="methods">
625
- <% sections["method_list"].each do |method_list|
626
- if method_list["methods"] then %>
627
- <h3 class="section-bar"><%= method_list["type"] %> <%= method_list["category"] %> methods</h3>
625
+ <% sections[:method_list].each do |method_list|
626
+ if method_list[:methods] then %>
627
+ <h3 class="section-bar"><%= method_list[:type] %> <%= method_list[:category] %> methods</h3>
628
628
 
629
- <% method_list["methods"].each do |methods| %>
630
- <div id="method-<%= methods["aref"] %>" class="method-detail">
631
- <a name="<%= methods["aref"] %>"></a>
629
+ <% method_list[:methods].each do |methods| %>
630
+ <div id="method-<%= methods[:aref] %>" class="method-detail">
631
+ <a name="<%= methods[:aref] %>"></a>
632
632
 
633
633
  <div class="method-heading">
634
- <% if methods["codeurl"] then %>
635
- <a href="<%= methods["codeurl"] %>" target="Code" class="method-signature"
636
- onclick="popupCode('<%= methods["codeurl"] %>');return false;">
634
+ <% if methods[:codeurl] then %>
635
+ <a href="<%= methods[:codeurl] %>" target="Code" class="method-signature"
636
+ onclick="popupCode('<%= methods[:codeurl] %>');return false;">
637
637
  <% end
638
- if methods["sourcecode"] then %>
639
- <a href="#<%= methods["aref"] %>" class="method-signature">
638
+ if methods[:sourcecode] then %>
639
+ <a href="#<%= methods[:aref] %>" class="method-signature">
640
640
  <% end
641
- if methods["callseq"] then %>
642
- <span class="method-name"><%= methods["callseq"] %></span>
641
+ if methods[:callseq] then %>
642
+ <span class="method-name"><%= methods[:callseq] %></span>
643
643
  <% end
644
- unless methods["callseq"] then %>
645
- <span class="method-name"><%= methods["name"] %></span><span class="method-args"><%= methods["params"] %></span>
644
+ unless methods[:callseq] then %>
645
+ <span class="method-name"><%= methods[:name] %></span><span class="method-args"><%= methods[:params] %></span>
646
646
  <% end
647
- if methods["codeurl"] then %>
647
+ if methods[:codeurl] then %>
648
648
  </a>
649
649
  <% end
650
- if methods["sourcecode"] then %>
650
+ if methods[:sourcecode] then %>
651
651
  </a>
652
652
  <% end %>
653
653
  </div>
654
654
 
655
655
  <div class="method-description">
656
- <% if methods["m_desc"] then %>
657
- <%= methods["m_desc"] %>
656
+ <% if methods[:m_desc] then %>
657
+ <%= methods[:m_desc] %>
658
658
  <% end
659
- if methods["sourcecode"] then %>
659
+ if methods[:sourcecode] then %>
660
660
  <p><a class="source-toggle" href="#"
661
- onclick="toggleCode('<%= methods["aref"] %>-source');return false;">[Source]</a></p>
662
- <div class="method-source-code" id="<%= methods["aref"] %>-source">
661
+ onclick="toggleCode('<%= methods[:aref] %>-source');return false;">[Source]</a></p>
662
+ <div class="method-source-code" id="<%= methods[:aref] %>-source">
663
663
  <pre>
664
- <%= methods["sourcecode"] %>
664
+ <%= methods[:sourcecode] %>
665
665
  </pre>
666
666
  </div>
667
667
  <% end %>
668
668
  </div>
669
669
  </div>
670
670
 
671
- <% end %><%# method_list["methods"] %><%
671
+ <% end %><%# method_list[:methods] %><%
672
672
  end
673
- end %><%# sections["method_list"] %>
673
+ end %><%# sections[:method_list] %>
674
674
 
675
675
  </div>
676
676
  <% end %>
677
- <% end %><%# values["sections"] %>
677
+ <% end %><%# values[:sections] %>
678
678
  EOF
679
679
 
680
680
  #####################################################################
@@ -699,12 +699,12 @@ EOF
699
699
 
700
700
  SRC_PAGE = XHTML_STRICT_PREAMBLE + HTML_ELEMENT + <<-EOF
701
701
  <head>
702
- <title><%= values["title"] %></title>
703
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
704
- <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
702
+ <title><%= values[:title] %></title>
703
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= values[:charset] %>" />
704
+ <link rel="stylesheet" href="<%= values[:style_url] %>" type="text/css" media="screen" />
705
705
  </head>
706
706
  <body class="standalone-code">
707
- <pre><%= values["code"] %></pre>
707
+ <pre><%= values[:code] %></pre>
708
708
  </body>
709
709
  </html>
710
710
  EOF
@@ -719,22 +719,22 @@ EOF
719
719
  FILE_INDEX = XHTML_STRICT_PREAMBLE + HTML_ELEMENT + <<-EOF
720
720
  <!--
721
721
 
722
- <%= values["title"] %>
722
+ <%= values[:title] %>
723
723
 
724
724
  -->
725
725
  <head>
726
- <title><%= values["title"] %></title>
727
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
728
- <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" />
726
+ <title><%= values[:title] %></title>
727
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= values[:charset] %>" />
728
+ <link rel="stylesheet" href="<%= values[:style_url] %>" type="text/css" />
729
729
  <base target="docwin" />
730
730
  </head>
731
731
  <body>
732
732
  <div class="index">
733
- <h1 class="section-bar"><%= values["list_title"] %></h1>
733
+ <h1 class="section-bar"><%= values[:list_title] %></h1>
734
734
  <div id="index-entries">
735
- <% values["entries"].each do |entries| %>
736
- <a href="<%= entries["href"] %>"><%= entries["name"] %></a><br />
737
- <% end %><%# values["entries"] %>
735
+ <% values[:entries].each do |entries| %>
736
+ <a href="<%= entries[:href] %>"><%= entries[:name] %></a><br />
737
+ <% end %><%# values[:entries] %>
738
738
  </div>
739
739
  </div>
740
740
  </body>
@@ -747,12 +747,12 @@ EOF
747
747
  INDEX = XHTML_FRAME_PREAMBLE + HTML_ELEMENT + <<-EOF
748
748
  <!--
749
749
 
750
- <%= values["title"] %>
750
+ <%= values[:title] %>
751
751
 
752
752
  -->
753
753
  <head>
754
- <title><%= values["title"] %></title>
755
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
754
+ <title><%= values[:title] %></title>
755
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= values[:charset] %>" />
756
756
  </head>
757
757
  <frameset rows="20%, 80%">
758
758
  <frameset cols="25%,35%,45%">
@@ -760,7 +760,7 @@ EOF
760
760
  <frame src="fr_class_index.html" name="Classes" />
761
761
  <frame src="fr_method_index.html" name="Methods" />
762
762
  </frameset>
763
- <frame src="<%= values["initial_page"] %>" name="docwin" />
763
+ <frame src="<%= values[:initial_page] %>" name="docwin" />
764
764
  </frameset>
765
765
  </html>
766
766
  EOF