rdoc 2.3.0 → 2.4.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 (81) hide show
  1. data.tar.gz.sig +0 -0
  2. data/.autotest +14 -0
  3. data/History.txt +27 -0
  4. data/Manifest.txt +29 -9
  5. data/Rakefile +2 -0
  6. data/bin/rdoc +13 -2
  7. data/lib/rdoc.rb +11 -3
  8. data/lib/rdoc/alias.rb +54 -0
  9. data/lib/rdoc/anon_class.rb +10 -0
  10. data/lib/rdoc/any_method.rb +190 -0
  11. data/lib/rdoc/attr.rb +79 -0
  12. data/lib/rdoc/cache.rb +11 -2
  13. data/lib/rdoc/class_module.rb +87 -0
  14. data/lib/rdoc/code_object.rb +152 -0
  15. data/lib/rdoc/code_objects.rb +18 -1118
  16. data/lib/rdoc/constant.rb +36 -0
  17. data/lib/rdoc/context.rb +712 -0
  18. data/lib/rdoc/diagram.rb +8 -8
  19. data/lib/rdoc/generator.rb +3 -1140
  20. data/lib/rdoc/generator/darkfish.rb +107 -133
  21. data/lib/rdoc/generator/markup.rb +194 -0
  22. data/lib/rdoc/generator/ri.rb +4 -2
  23. data/lib/rdoc/generator/template/darkfish/classpage.rhtml +92 -113
  24. data/lib/rdoc/generator/template/darkfish/filepage.rhtml +33 -35
  25. data/lib/rdoc/generator/template/darkfish/index.rhtml +22 -15
  26. data/lib/rdoc/ghost_method.rb +8 -0
  27. data/lib/rdoc/include.rb +39 -0
  28. data/lib/rdoc/markup/attribute_manager.rb +46 -0
  29. data/lib/rdoc/markup/formatter.rb +11 -0
  30. data/lib/rdoc/markup/fragments.rb +42 -2
  31. data/lib/rdoc/markup/inline.rb +29 -4
  32. data/lib/rdoc/markup/lines.rb +4 -0
  33. data/lib/rdoc/markup/preprocess.rb +4 -0
  34. data/lib/rdoc/markup/to_flow.rb +27 -1
  35. data/lib/rdoc/markup/to_html.rb +33 -33
  36. data/lib/rdoc/markup/to_html_crossref.rb +4 -11
  37. data/lib/rdoc/markup/to_latex.rb +31 -31
  38. data/lib/rdoc/markup/to_test.rb +3 -0
  39. data/lib/rdoc/markup/to_texinfo.rb +18 -14
  40. data/lib/rdoc/meta_method.rb +8 -0
  41. data/lib/rdoc/normal_class.rb +18 -0
  42. data/lib/rdoc/normal_module.rb +34 -0
  43. data/lib/rdoc/options.rb +26 -159
  44. data/lib/rdoc/parser/c.rb +16 -8
  45. data/lib/rdoc/parser/ruby.rb +16 -10
  46. data/lib/rdoc/parser/simple.rb +1 -1
  47. data/lib/rdoc/rdoc.rb +50 -34
  48. data/lib/rdoc/require.rb +32 -0
  49. data/lib/rdoc/ri/descriptions.rb +1 -1
  50. data/lib/rdoc/ri/driver.rb +4 -4
  51. data/lib/rdoc/ri/formatter.rb +70 -32
  52. data/lib/rdoc/single_class.rb +8 -0
  53. data/lib/rdoc/top_level.rb +232 -0
  54. data/test/test_rdoc_any_method.rb +10 -0
  55. data/test/test_rdoc_code_object.rb +80 -0
  56. data/test/test_rdoc_constant.rb +15 -0
  57. data/test/test_rdoc_context.rb +250 -0
  58. data/test/test_rdoc_include.rb +17 -0
  59. data/test/test_rdoc_markup.rb +13 -2
  60. data/test/test_rdoc_markup_to_html.rb +22 -0
  61. data/test/test_rdoc_markup_to_html_crossref.rb +50 -115
  62. data/test/test_rdoc_normal_module.rb +26 -0
  63. data/test/test_rdoc_parser_c.rb +33 -0
  64. data/test/test_rdoc_parser_ruby.rb +54 -36
  65. data/test/test_rdoc_require.rb +25 -0
  66. data/test/test_rdoc_ri_default_display.rb +2 -1
  67. data/test/test_rdoc_ri_html_formatter.rb +141 -0
  68. data/test/test_rdoc_top_level.rb +85 -0
  69. data/test/xref_data.rb +46 -0
  70. data/test/xref_test_case.rb +48 -0
  71. metadata +42 -13
  72. metadata.gz.sig +0 -0
  73. data/lib/rdoc/generator/html.rb +0 -456
  74. data/lib/rdoc/generator/html/common.rb +0 -24
  75. data/lib/rdoc/generator/html/html.rb +0 -769
  76. data/lib/rdoc/generator/html/one_page_html.rb +0 -122
  77. data/lib/rdoc/generator/xml.rb +0 -124
  78. data/lib/rdoc/generator/xml/rdf.rb +0 -113
  79. data/lib/rdoc/generator/xml/xml.rb +0 -123
  80. data/lib/rdoc/parser/f95.rb +0 -1835
  81. data/lib/rdoc/template.rb +0 -68
@@ -34,7 +34,7 @@ class RDoc::Generator::RI
34
34
  # Build the initial indices and output objects based on an array of
35
35
  # TopLevel objects containing the extracted information.
36
36
 
37
- def generate(toplevels)
37
+ def generate(top_levels)
38
38
  RDoc::TopLevel.all_classes_and_modules.each do |cls|
39
39
  process_class cls
40
40
  end
@@ -55,7 +55,9 @@ class RDoc::Generator::RI
55
55
  cls_desc = RDoc::RI::ModuleDescription.new
56
56
  else
57
57
  cls_desc = RDoc::RI::ClassDescription.new
58
- cls_desc.superclass = cls.superclass
58
+ superclass = cls.superclass
59
+ superclass = superclass.full_name unless String === superclass
60
+ cls_desc.superclass = superclass
59
61
  end
60
62
 
61
63
  cls_desc.name = cls.name
@@ -3,38 +3,38 @@
3
3
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
4
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
5
  <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
6
+ <meta content="text/html; charset=<%= @options.charset %>" http-equiv="Content-Type" />
7
7
 
8
- <title><%= classinfo[:classmod] %>: <%= classinfo[:full_name] %></title>
8
+ <title><%= klass.type.capitalize %>: <%= klass.full_name %></title>
9
9
 
10
10
  <link rel="stylesheet" href="<%= rel_prefix %>/rdoc.css" type="text/css" media="screen" />
11
11
 
12
- <script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"
12
+ <script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"
13
13
  charset="utf-8"></script>
14
- <script src="<%= rel_prefix %>/js/thickbox-compressed.js" type="text/javascript"
14
+ <script src="<%= rel_prefix %>/js/thickbox-compressed.js" type="text/javascript"
15
15
  charset="utf-8"></script>
16
- <script src="<%= rel_prefix %>/js/quicksearch.js" type="text/javascript"
16
+ <script src="<%= rel_prefix %>/js/quicksearch.js" type="text/javascript"
17
17
  charset="utf-8"></script>
18
- <script src="<%= rel_prefix %>/js/darkfish.js" type="text/javascript"
18
+ <script src="<%= rel_prefix %>/js/darkfish.js" type="text/javascript"
19
19
  charset="utf-8"></script>
20
20
 
21
21
  </head>
22
- <body class="<%= classinfo[:classmod].downcase %>">
23
-
22
+ <body class="<%= klass.type %>">
23
+
24
24
  <div id="metadata">
25
25
  <div id="file-metadata">
26
26
  <div id="file-list-section" class="section">
27
27
  <h3 class="section-header">In Files</h3>
28
28
  <div class="section-body">
29
29
  <ul>
30
- <% classinfo[:infiles].each do |file| %>
31
- <li><a href="<%= rel_prefix %>/<%= file[:full_path] %>.html?TB_iframe=true&amp;height=550&amp;width=785"
32
- class="thickbox" title="<%= file[:full_path] %>"><%= file[:full_path] %></a></li>
30
+ <% klass.in_files.each do |tl| %>
31
+ <li><a href="<%= rel_prefix %>/<%= h tl.absolute_name %>.html?TB_iframe=true&amp;height=550&amp;width=785"
32
+ class="thickbox" title="<%= h tl.absolute_name %>"><%= h tl.absolute_name %></a></li>
33
33
  <% end %>
34
34
  </ul>
35
35
  </div>
36
36
  </div>
37
-
37
+
38
38
  <% if !svninfo.empty? %>
39
39
  <div id="file-svninfo-section" class="section">
40
40
  <h3 class="section-header">Subversion Info</h3>
@@ -42,11 +42,11 @@
42
42
  <dl class="svninfo">
43
43
  <dt>Rev</dt>
44
44
  <dd><%= svninfo[:rev] %></dd>
45
-
45
+
46
46
  <dt>Last Checked In</dt>
47
- <dd><%= svninfo[:commitdate].strftime('%Y-%m-%d %H:%M:%S') %>
47
+ <dd><%= svninfo[:commitdate].strftime('%Y-%m-%d %H:%M:%S') %>
48
48
  (<%= svninfo[:commitdelta] %> ago)</dd>
49
-
49
+
50
50
  <dt>Checked in by</dt>
51
51
  <dd><%= svninfo[:committer] %></dd>
52
52
  </dl>
@@ -58,122 +58,115 @@
58
58
  <div id="class-metadata">
59
59
 
60
60
  <!-- Parent Class -->
61
- <% if classinfo[:classmod] == 'Class' %>
61
+ <% if klass.type == 'class' %>
62
62
  <div id="parent-class-section" class="section">
63
63
  <h3 class="section-header">Parent</h3>
64
- <% if classinfo[:par_url] %>
65
- <p class="link"><a href="<%= classinfo[:par_url] %>"><%= classinfo[:parent] %></a></p>
64
+ <% unless String === klass.superclass %>
65
+ <p class="link"><a href="<%= klass.aref_to klass.superclass.path %>"><%= klass.superclass.full_name %></a></p>
66
66
  <% else %>
67
- <p class="link"><%= classinfo[:parent] %></p>
67
+ <p class="link"><%= klass.superclass %></p>
68
68
  <% end %>
69
69
  </div>
70
70
  <% end %>
71
71
 
72
72
  <!-- Namespace Contents -->
73
- <% if classinfo[:sections].first.key?( :classlist ) %>
73
+ <% unless klass.classes_and_modules.empty? %>
74
74
  <div id="namespace-list-section" class="section">
75
75
  <h3 class="section-header">Namespace</h3>
76
76
  <ul class="link-list">
77
- <% classinfo[:sections].first[:classlist].each do |desc| %>
78
- <li><%= desc.sub(/^(\w+)/, %Q{<span class="type">\\1</span>}) %></li>
77
+ <% (klass.modules.sort + klass.classes.sort).each do |mod| %>
78
+ <li><span class="type"><%= mod.type.upcase %></span> <a href="<%= klass.aref_to mod.path %>"><%= mod.full_name %></a></li>
79
79
  <% end %>
80
80
  </ul>
81
81
  </div>
82
82
  <% end %>
83
83
 
84
84
  <!-- Method Quickref -->
85
- <% if classinfo.key?( :methods ) %>
85
+ <% unless klass.method_list.empty? %>
86
86
  <div id="method-list-section" class="section">
87
87
  <h3 class="section-header">Methods</h3>
88
88
  <ul class="link-list">
89
- <% classinfo[:methods].each do |meth| %>
90
- <li><a href="#<%= meth[:name] %>"><%= meth[:name]
91
- %></a></li>
89
+ <% klass.each_method do |meth| %>
90
+ <li><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= meth.name %></a></li>
92
91
  <% end %>
93
92
  </ul>
94
93
  </div>
95
94
  <% end %>
96
95
 
97
96
  <!-- Included Modules -->
98
- <% if classinfo[:includes] %>
97
+ <% unless klass.includes.empty? %>
99
98
  <div id="includes-section" class="section">
100
99
  <h3 class="section-header">Included Modules</h3>
101
100
  <ul class="link-list">
102
- <% classinfo[:includes].each do |inc| %>
103
- <% if inc[:aref].nil? %>
104
- <li><span class="include"><%= inc[:name] %></span></li>
101
+ <% klass.each_include do |inc| %>
102
+ <% unless String === inc.module %>
103
+ <li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a></li>
105
104
  <% else %>
106
- <li><a class="include" href="<%= inc[:aref] %>"><%= inc[:name] %></a></li>
105
+ <li><span class="include"><%= inc.name %></span></li>
107
106
  <% end %>
108
107
  <% end %>
109
108
  </ul>
110
109
  </div>
111
110
  <% end %>
112
111
  </div>
113
-
112
+
114
113
  <div id="project-metadata">
115
- <% simple_files = files.select {|_, file| file[:parser] == RDoc::Parser::Simple } %>
114
+ <% simple_files = @files.select {|tl| tl.parser == RDoc::Parser::Simple } %>
116
115
  <% unless simple_files.empty? then %>
117
116
  <div id="fileindex-section" class="section project-section">
118
117
  <h3 class="section-header">Files</h3>
119
118
  <ul>
120
- <% simple_files.sort_by {|name,_| name }.each do |name, file| %>
121
- <li class="file"><a href="<%= rel_prefix %>/<%= file[:short_name] %>.html"><%= h file[:short_name] %></a></li>
119
+ <% simple_files.each do |file| %>
120
+ <li class="file"><a href="<%= rel_prefix %>/<%= file.base_name %>.html"><%= h file.base_name %></a></li>
122
121
  <% end %>
123
122
  </ul>
124
123
  </div>
125
124
  <% end %>
126
-
125
+
127
126
  <div id="classindex-section" class="section project-section">
128
- <h3 class="section-header">Class Index
129
- <span class="search-toggle"><img src="<%= rel_prefix %>/images/find.png"
130
- height="16" width="16" alt="[+]"
127
+ <h3 class="section-header">Class Index
128
+ <span class="search-toggle"><img src="<%= rel_prefix %>/images/find.png"
129
+ height="16" width="16" alt="[+]"
131
130
  title="show/hide quicksearch" /></span></h3>
132
131
  <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
133
132
  <fieldset>
134
133
  <legend>Quicksearch</legend>
135
- <input type="text" name="quicksearch" value=""
134
+ <input type="text" name="quicksearch" value=""
136
135
  class="quicksearch-field" />
137
136
  </fieldset>
138
137
  </form>
139
138
 
140
139
  <ul class="link-list">
141
- <% modsort.each do |cname| %>
142
- <% cinfo = classes[cname] %>
143
- <li><a href="<%= rel_prefix %>/<%= cinfo[:outfile] %>"><%= cname %></a></li>
140
+ <% @modsort.each do |index_klass| %>
141
+ <li><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.full_name %></a></li>
144
142
  <% end %>
145
143
  </ul>
146
144
  <div id="no-class-search-results" style="display: none;">No matching classes.</div>
147
145
  </div>
148
-
149
- <% if $DEBUG %>
150
- <div id="debugging-toggle"><img src="<%= rel_prefix %>/images/bug.png"
146
+
147
+ <% if $DEBUG_RDOC %>
148
+ <div id="debugging-toggle"><img src="<%= rel_prefix %>/images/bug.png"
151
149
  alt="toggle debugging" height="16" width="16" /></div>
152
150
  <% end %>
153
151
  </div>
154
152
  </div>
155
153
 
156
154
  <div id="documentation">
157
- <% if classinfo[:classmod] == 'Class' %>
158
- <h1 class="class"><%= classinfo[:full_name] %></h1>
159
- <% else %>
160
- <h1 class="module"><%= classinfo[:full_name] %></h1>
161
- <% end %>
155
+ <h1 class="<%= klass.type %>"><%= klass.full_name %></h1>
162
156
 
163
157
  <div id="description">
164
- <%= classinfo[:description] %>
158
+ <%= klass.description %>
165
159
  </div>
166
160
 
167
-
168
161
  <!-- Constants -->
169
- <% if classinfo[:sections].first[:constants] %>
162
+ <% unless klass.constants.empty? %>
170
163
  <div id="constants-list" class="section">
171
164
  <h3 class="section-header">Constants</h3>
172
165
  <dl>
173
- <% classinfo[:sections].first[:constants].each do |const| %>
174
- <dt><a name="<%= const[:name] %>"><%= const[:name] %></a></dt>
175
- <% if const[:desc] %>
176
- <dd class="description"><%= const[:desc].strip %></dd>
166
+ <% klass.each_constant do |const| %>
167
+ <dt><a name="<%= const.name %>"><%= const.name %></a></dt>
168
+ <% if const.comment %>
169
+ <dd class="description"><%= const.description.strip %></dd>
177
170
  <% else %>
178
171
  <dd class="description missing-docs">(Not documented)</dd>
179
172
  <% end %>
@@ -183,24 +176,24 @@
183
176
  <% end %>
184
177
 
185
178
  <!-- Attributes -->
186
- <% if classinfo[:sections].first[:attributes] %>
179
+ <% unless klass.attributes.empty? %>
187
180
  <div id="attribute-method-details" class="method-section section">
188
181
  <h3 class="section-header">Attributes</h3>
189
182
 
190
- <% classinfo[:sections].first[:attributes].each do |attrib| %>
191
- <div id="<%= attrib[:name].downcase.gsub(/[^a-z]+/, '-') %>-attribute-method" class="method-detail">
192
- <a name="<%= attrib[:name] %>"></a>
193
- <% if attrib[:rw] =~ /w/i %>
194
- <a name="<%= attrib[:name] %>="></a>
183
+ <% klass.each_attribute do |attrib| %>
184
+ <div id="<%= attrib.html_name %>-attribute-method" class="method-detail">
185
+ <a name="<%= h attrib.name %>"></a>
186
+ <% if attrib.rw =~ /w/i %>
187
+ <a name="<%= h attrib.name %>="></a>
195
188
  <% end %>
196
189
  <div class="method-heading attribute-method-heading">
197
- <span class="method-name"><%= h attrib[:name] %></span><span
198
- class="attribute-access-type">[<%= attrib[:rw] %>]</span>
190
+ <span class="method-name"><%= h attrib.name %></span><span
191
+ class="attribute-access-type">[<%= attrib.rw %>]</span>
199
192
  </div>
200
193
 
201
194
  <div class="method-description">
202
- <% if attrib[:a_desc] && !attrib[:a_desc].empty? %>
203
- <%= attrib[:a_desc].strip %>
195
+ <% if attrib.comment %>
196
+ <%= attrib.description.strip %>
204
197
  <% else %>
205
198
  <p class="missing-docs">(Not documented)</p>
206
199
  <% end %>
@@ -211,59 +204,49 @@
211
204
  <% end %>
212
205
 
213
206
  <!-- Methods -->
214
- <% if classinfo[:sections].first[:method_list] %>
215
- <% classinfo[:sections].first[:method_list].each do |methodlist| %>
216
- <div id="<%= methodlist[:type].downcase %>-<%= methodlist[:category].downcase %>-method-details" class="method-section section">
217
- <h3 class="section-header"><%= methodlist[:type] %> <%= methodlist[:category] %> Methods</h3>
218
-
219
- <% methodlist[:methods].each do |methodinfo| %>
220
-
221
- <%
222
- # If the method doesn't have a 'name' attribute, it's defined in C, so make one out of the
223
- # first method name in the callseq.
224
- unless methodinfo[:name]
225
- methodinfo[:name] = methodinfo[:callseq][/^.*?\.(\w+)/, 1] || methodinfo[:callseq]
226
- end
227
- %>
228
- <% if methodinfo[:m_desc] =~ /Alias for/ %>
229
- <div id="<%= methodinfo[:name].gsub( /[^a-z]+/, '-' ) %>-method" class="method-detail method-alias">
230
- <% else %>
231
- <div id="<%= methodinfo[:name].gsub( /[^a-z]+/, '-' ) %>-method" class="method-detail">
232
- <% end %>
233
- <a name="<%= methodinfo[:name] %>"></a>
207
+ <% klass.methods_by_type.each do |type, visibilities|
208
+ next if visibilities.empty?
209
+ visibilities.each do |visibility, methods|
210
+ next if methods.empty? %>
211
+ <div id="<%= visibility %>-<%= type %>-method-details" class="method-section section">
212
+ <h3 class="section-header"><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3>
213
+
214
+ <% methods.each do |method| %>
215
+ <div id="<%= method.html_name %>-method" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
216
+ <a name="<%= h method.aref %>"></a>
234
217
 
235
218
  <div class="method-heading">
236
- <% if methodinfo[:callseq] %>
237
- <span class="method-callseq"><%= methodinfo[:callseq].strip.gsub( /^\w.*?\./m, '') %></span>
219
+ <% if method.call_seq %>
220
+ <span class="method-callseq"><%= method.call_seq.strip.gsub(/->/, '&rarr;').gsub( /^\w.*?\./m, '') %></span>
238
221
  <span class="method-click-advice">click to toggle source</span>
239
222
  <% else %>
240
- <span class="method-name"><%= methodinfo[:name] %></span><span
241
- class="method-args"><%= methodinfo[:params] %></span>
223
+ <span class="method-name"><%= h method.name %></span><span
224
+ class="method-args"><%= method.params %></span>
242
225
  <span class="method-click-advice">click to toggle source</span>
243
226
  <% end %>
244
227
  </div>
245
228
 
246
229
  <div class="method-description">
247
- <% if methodinfo[:m_desc] %>
248
- <%= methodinfo[:m_desc].strip %>
230
+ <% if method.comment %>
231
+ <%= method.description.strip %>
249
232
  <% else %>
250
233
  <p class="missing-docs">(Not documented)</p>
251
234
  <% end %>
252
-
253
- <% if methodinfo[:sourcecode] %>
254
- <div class="method-source-code"
255
- id="<%= methodinfo[:name].gsub( /[^a-z]+/, '-' ) %>-source">
235
+
236
+ <% if method.token_stream %>
237
+ <div class="method-source-code"
238
+ id="<%= method.html_name %>-source">
256
239
  <pre>
257
- <%= methodinfo[:sourcecode] %>
240
+ <%= method.markup_code %>
258
241
  </pre>
259
242
  </div>
260
243
  <% end %>
261
244
  </div>
262
245
 
263
- <% if methodinfo[:aka] %>
246
+ <% unless method.aliases.empty? %>
264
247
  <div class="aliases">
265
- Also aliased as: <%= methodinfo[:aka].collect do |aliasinfo|
266
- %{<a href="#{aliasinfo[:aref]}">#{aliasinfo[:name]}</a>}
248
+ Also aliased as: <%= method.aliases.map do |aka|
249
+ %{<a href="#{ klass.aref_to aka.path}">#{h aka.name}</a>}
267
250
  end.join(", ") %>
268
251
  </div>
269
252
  <% end %>
@@ -271,29 +254,25 @@
271
254
 
272
255
  <% end %>
273
256
  </div>
274
- <% end %>
275
- <% end %>
257
+ <% end
258
+ end %>
276
259
 
277
260
  </div>
278
261
 
279
262
 
280
263
  <div id="rdoc-debugging-section-dump" class="debugging-section">
281
- <% if $DEBUG %>
282
- <% classinfo[:sections].first.keys.each do |section| %>
283
- <div class="section">
284
- <h2 class="section-header"><%= section %></h2>
285
-
286
- <pre><%= h classinfo[:sections].first[section].to_yaml %></pre>
264
+ <% if $DEBUG_RDOC
265
+ require 'pp' %>
266
+ <pre><%= h PP.pp(klass, _erbout) %></pre>
287
267
  </div>
288
- <% end %>
289
268
  <% else %>
290
- <p>Disabled; run with $DEBUG to generate this.</p>
269
+ <p>Disabled; run with --debug to generate this.</p>
291
270
  <% end %>
292
271
  </div>
293
272
 
294
273
  <div id="validator-badges">
295
274
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
296
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
275
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
297
276
  Rdoc Generator</a> <%= RDoc::Generator::Darkfish::VERSION %></small>.</p>
298
277
  </div>
299
278
 
@@ -4,75 +4,73 @@
4
4
 
5
5
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
6
  <head>
7
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+ <meta content="text/html; charset=<%= @options.charset %>" http-equiv="Content-Type" />
8
8
 
9
- <title><%= fileinfo[:title] %></title>
9
+ <title>File: <%= file.base_name %> [<%= @options.title %>]</title>
10
10
 
11
11
  <link type="text/css" media="screen" href="<%= rel_prefix %>/rdoc.css" rel="stylesheet" />
12
12
 
13
- <script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"
13
+ <script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"
14
14
  charset="utf-8"></script>
15
- <script src="<%= rel_prefix %>/js/thickbox-compressed.js" type="text/javascript"
15
+ <script src="<%= rel_prefix %>/js/thickbox-compressed.js" type="text/javascript"
16
16
  charset="utf-8"></script>
17
- <script src="<%= rel_prefix %>/js/quicksearch.js" type="text/javascript"
17
+ <script src="<%= rel_prefix %>/js/quicksearch.js" type="text/javascript"
18
18
  charset="utf-8"></script>
19
- <script src="<%= rel_prefix %>/js/darkfish.js" type="text/javascript"
19
+ <script src="<%= rel_prefix %>/js/darkfish.js" type="text/javascript"
20
20
  charset="utf-8"></script>
21
21
  </head>
22
-
23
- <% if fileinfo[:parser] == RDoc::Parser::Simple %>
22
+
23
+ <% if file.parser == RDoc::Parser::Simple %>
24
24
  <body class="file">
25
25
  <div id="metadata">
26
26
  <div id="project-metadata">
27
- <% simple_files = files.select {|_, file| file[:parser] == RDoc::Parser::Simple } %>
27
+ <% simple_files = @files.select { |f| f.parser == RDoc::Parser::Simple } %>
28
28
  <% unless simple_files.empty? then %>
29
29
  <div id="fileindex-section" class="section project-section">
30
30
  <h3 class="section-header">Files</h3>
31
31
  <ul>
32
- <% simple_files.sort_by {|name,_| name }.each do |name, file| %>
33
- <li class="file"><a href="<%= rel_prefix %>/<%=
34
- file[:short_name] %>.html"><%= h file[:short_name] %></a></li>
32
+ <% simple_files.each do |f| %>
33
+ <li class="file"><a href="<%= rel_prefix %>/<%= f.base_name %>.html"><%= h f.base_name %></a></li>
35
34
  <% end %>
36
35
  </ul>
37
36
  </div>
38
37
  <% end %>
39
38
 
40
39
  <div id="classindex-section" class="section project-section">
41
- <h3 class="section-header">Class Index
42
- <span class="search-toggle"><img src="<%= rel_prefix %>/images/find.png"
43
- height="16" width="16" alt="[+]"
40
+ <h3 class="section-header">Class Index
41
+ <span class="search-toggle"><img src="<%= rel_prefix %>/images/find.png"
42
+ height="16" width="16" alt="[+]"
44
43
  title="show/hide quicksearch" /></span></h3>
45
44
  <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
46
45
  <fieldset>
47
46
  <legend>Quicksearch</legend>
48
- <input type="text" name="quicksearch" value=""
47
+ <input type="text" name="quicksearch" value=""
49
48
  class="quicksearch-field" />
50
49
  </fieldset>
51
50
  </form>
52
51
 
53
52
  <ul class="link-list">
54
- <% modsort.each do |cname| %>
55
- <% cinfo = classes[cname] %>
56
- <li><a href="<%= rel_prefix %>/<%= cinfo[:outfile] %>"><%= cname %></a></li>
53
+ <% @modsort.each do |index_klass| %>
54
+ <li><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.full_name %></a></li>
57
55
  <% end %>
58
56
  </ul>
59
57
  <div id="no-class-search-results" style="display: none;">No matching classes.</div>
60
58
  </div>
61
-
62
- <% if $DEBUG %>
63
- <div id="debugging-toggle"><img src="<%= rel_prefix %>/images/bug.png"
59
+
60
+ <% if $DEBUG_RDOC %>
61
+ <div id="debugging-toggle"><img src="<%= rel_prefix %>/images/bug.png"
64
62
  alt="toggle debugging" height="16" width="16" /></div>
65
63
  <% end %>
66
64
  </div>
67
65
  </div>
68
66
 
69
67
  <div id="documentation">
70
- <%= fileinfo[:description] %>
68
+ <%= file.description %>
71
69
  </div>
72
70
 
73
71
  <div id="validator-badges">
74
72
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
75
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
73
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
76
74
  Rdoc Generator</a> <%= RDoc::Generator::Darkfish::VERSION %></small>.</p>
77
75
  </div>
78
76
  </body>
@@ -81,30 +79,30 @@
81
79
  <div id="metadata">
82
80
  <dl>
83
81
  <dt class="modified-date">Last Modified</dt>
84
- <dd class="modified-date"><%= fileinfo[:dtm_modified] %></dd>
85
-
86
- <% if fileinfo[:requires] %>
82
+ <dd class="modified-date"><%= file.last_modified %></dd>
83
+
84
+ <% if file.requires %>
87
85
  <dt class="requires">Requires</dt>
88
86
  <dd class="requires">
89
87
  <ul>
90
- <% fileinfo[:requires].each do |dependency| %>
91
- <li><%= dependency[:name] %></li>
88
+ <% file.requires.each do |require| %>
89
+ <li><%= require.name %></li>
92
90
  <% end %>
93
91
  </ul>
94
92
  </dd>
95
93
  <% end %>
96
-
97
- <% if fileinfo[:cvsurl] %>
94
+
95
+ <% if @options.webcvs %>
98
96
  <dt class="scs-url">Trac URL</dt>
99
- <dd class="scs-url"><a target="_top"
100
- href="<%= fileinfo[:cvsurl] %>"><%= fileinfo[:cvsurl] %></a></dd>
97
+ <dd class="scs-url"><a target="_top"
98
+ href="<%= file.cvs_url %>"><%= file.cvs_url %></a></dd>
101
99
  <% end %>
102
100
  </dl>
103
101
 
104
- <% if fileinfo[:description] %>
102
+ <% if file.comment %>
105
103
  <div class="description">
106
104
  <h2>Description</h2>
107
- <%= fileinfo[:description] %>
105
+ <%= file.description %>
108
106
  </div>
109
107
  <% end %>
110
108
  </div>