summaryrefslogtreecommitdiff
path: root/lib/rdoc/generator/html/html.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/generator/html/html.rb')
-rw-r--r--lib/rdoc/generator/html/html.rb168
1 files changed, 81 insertions, 87 deletions
diff --git a/lib/rdoc/generator/html/html.rb b/lib/rdoc/generator/html/html.rb
index 63c83ee5fd..1ab90c6264 100644
--- a/lib/rdoc/generator/html/html.rb
+++ b/lib/rdoc/generator/html/html.rb
@@ -7,8 +7,8 @@ require 'rdoc/generator/html/one_page_html'
# This is a template for RDoc that uses XHTML 1.0 Transitional and dictates a
# bit more of the appearance of the output to cascading stylesheets than the
# default. It was designed for clean inline code display, and uses DHTMl to
-# toggle the visibility of each method's source with each click on the '[source]'
-# link.
+# toggle the visibility of each method's source with each click on the
+# '[source]' link.
#
# == Authors
#
@@ -16,10 +16,10 @@ require 'rdoc/generator/html/one_page_html'
#
# Copyright (c) 2002, 2003 The FaerieMUD Consortium. Some rights reserved.
#
-# This work is licensed under the Creative Commons Attribution License. To view
-# a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or
-# send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
-# 94305, USA.
+# This work is licensed under the Creative Commons Attribution License. To
+# view a copy of this license, visit
+# http://creativecommons.org/licenses/by/1.0/ or send a letter to Creative
+# Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
module RDoc::Generator::HTML::HTML
@@ -361,7 +361,7 @@ EOF
&nbsp;(<a href="<%= infiles["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
<% end %>
<br />
-<% end # values["infiles"] %>
+<% end %><%# values["infiles"] %>
</td>
</tr>
@@ -388,39 +388,38 @@ EOF
#####################################################################
METHOD_LIST = <<-EOF
-
<div id="contextContent">
<% if values["diagram"] then %>
<div id="diagram">
<%= values["diagram"] %>
</div>
-<% end %>
+<% end
-<% if values["description"] then %>
+ if values["description"] then %>
<div id="description">
<%= values["description"] %>
</div>
-<% end %>
+<% end
-<% if values["requires"] then %>
+ if values["requires"] then %>
<div id="requires-list">
<h3 class="section-bar">Required files</h3>
<div class="name-list">
<% values["requires"].each do |requires| %>
<%= href requires["aref"], requires["name"] %>&nbsp;&nbsp;
-<% end # values["requires"] %>
+<% end %><%# values["requires"] %>
</div>
</div>
-<% end %>
+<% end
-<% if values["toc"] then %>
+ if values["toc"] then %>
<div id="contents-list">
<h3 class="section-bar">Contents</h3>
<ul>
<% values["toc"].each do |toc| %>
- <li><a href="#<%= values["href"] %>"><%= values["secname"] %></a></li>
-<% end # values["toc"] %>
+ <li><a href="#<%= toc["href"] %>"><%= toc["secname"] %></a></li>
+<% end %><%# values["toc"] %>
</ul>
<% end %>
</div>
@@ -430,16 +429,14 @@ EOF
<h3 class="section-bar">Methods</h3>
<div class="name-list">
-<% values["methods"].each do |methods| %>
+<% values["methods"].each do |methods| %>
<%= href methods["aref"], methods["name"] %>&nbsp;&nbsp;
-<% end # values["methods"] %>
+<% end %><%# values["methods"] %>
</div>
</div>
<% end %>
-
</div>
-
<!-- if includes -->
<% if values["includes"] then %>
<div id="includes">
@@ -448,140 +445,137 @@ EOF
<div id="includes-list">
<% values["includes"].each do |includes| %>
<span class="include-name"><%= href includes["aref"], includes["name"] %></span>
-<% end # values["includes"] %>
+<% end %><%# values["includes"] %>
</div>
</div>
-<% end %>
+<% end
-<% values["sections"].each do |sections| %>
+ values["sections"].each do |sections| %>
<div id="section">
-<% if sections["sectitle"] then %>
+<% if sections["sectitle"] then %>
<h2 class="section-title"><a name="<%= sections["secsequence"] %>"><%= sections["sectitle"] %></a></h2>
-<% if sections["seccomment"] then %>
+<% if sections["seccomment"] then %>
<div class="section-comment">
<%= sections["seccomment"] %>
</div>
-<% end %>
-<% end %>
+<% end
+ end
-<% if values["classlist"] then %>
+ if sections["classlist"] then %>
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
- <%= values["classlist"] %>
+ <%= sections["classlist"] %>
</div>
-<% end %>
+<% end
-<% if values["constants"] then %>
+ if sections["constants"] then %>
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
-<% values["constants"].each do |constants| %>
+<% sections["constants"].each do |constants| %>
<tr class="top-aligned-row context-row">
<td class="context-item-name"><%= constants["name"] %></td>
<td>=</td>
<td class="context-item-value"><%= constants["value"] %></td>
-<% if values["desc"] then %>
+<% if sections["desc"] then %>
<td width="3em">&nbsp;</td>
<td class="context-item-desc"><%= constants["desc"] %></td>
-<% end %>
+<% end %>
</tr>
-<% end # values["constants"] %>
+<% end %><%# sections["constants"] %>
</table>
</div>
</div>
-<% end %>
+<% end
-<% if values["aliases"] then %>
+ if sections["aliases"] then %>
<div id="aliases-list">
<h3 class="section-bar">External Aliases</h3>
<div class="name-list">
- <table summary="aliases">
-<% values["aliases"].each do |aliases| $stderr.puts({ :aliases => aliases }.inspect) %>
+ <table summary="aliases">
+<% sections["aliases"].each do |aliases| %>
<tr class="top-aligned-row context-row">
- <td class="context-item-name"><%= values["old_name"] %></td>
+ <td class="context-item-name"><%= aliases["old_name"] %></td>
<td>-&gt;</td>
- <td class="context-item-value"><%= values["new_name"] %></td>
+ <td class="context-item-value"><%= aliases["new_name"] %></td>
</tr>
-<% if values["desc"] then %>
+<% if aliases["desc"] then %>
<tr class="top-aligned-row context-row">
<td>&nbsp;</td>
- <td colspan="2" class="context-item-desc"><%= values["desc"] %></td>
+ <td colspan="2" class="context-item-desc"><%= aliases["desc"] %></td>
</tr>
-<% end %>
-<% end # values["aliases"] %>
+<% end
+ end %><%# sections["aliases"] %>
</table>
</div>
</div>
-<% end %>
-
+<% end %>
-<% if values["attributes"] then %>
+<% if sections["attributes"] then %>
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
-<% values["attributes"].each do |attributes| $stderr.puts({ :attributes => attributes }.inspect) %>
+<% sections["attributes"].each do |attribute| %>
<tr class="top-aligned-row context-row">
- <td class="context-item-name"><%= values["name"] %></td>
-<% if values["rw"] then %>
- <td class="context-item-value">&nbsp;[<%= values["rw"] %>]&nbsp;</td>
-<% end %>
-<% unless values["rw"] then %>
+ <td class="context-item-name"><%= attribute["name"] %></td>
+<% if attribute["rw"] then %>
+ <td class="context-item-value">&nbsp;[<%= attribute["rw"] %>]&nbsp;</td>
+<% end
+ unless attribute["rw"] then %>
<td class="context-item-value">&nbsp;&nbsp;</td>
-<% end %>
- <td class="context-item-desc"><%= values["a_desc"] %></td>
+<% end %>
+ <td class="context-item-desc"><%= attribute["a_desc"] %></td>
</tr>
-<% end # values["attributes"] %>
+<% end %><%# sections["attributes"] %>
</table>
</div>
</div>
-<% end %>
-
-
+<% end %>
<!-- if method_list -->
-<% if sections["method_list"] then %>
+<% if sections["method_list"] then %>
<div id="methods">
-<% sections["method_list"].each do |method_list| %>
-<% if method_list["methods"] then %>
+<% sections["method_list"].each do |method_list|
+ if method_list["methods"] then %>
<h3 class="section-bar"><%= method_list["type"] %> <%= method_list["category"] %> methods</h3>
-<% method_list["methods"].each do |methods| %>
+<% method_list["methods"].each do |methods| %>
<div id="method-<%= methods["aref"] %>" class="method-detail">
<a name="<%= methods["aref"] %>"></a>
<div class="method-heading">
-<% if methods["codeurl"] then %>
+<% if methods["codeurl"] then %>
<a href="<%= methods["codeurl"] %>" target="Code" class="method-signature"
onclick="popupCode('<%= methods["codeurl"] %>');return false;">
-<% end %>
-<% if methods["sourcecode"] then %>
+<% end
+ if methods["sourcecode"] then %>
<a href="#<%= methods["aref"] %>" class="method-signature">
-<% end %>
-<% if methods["callseq"] then %>
+<% end
+ if methods["callseq"] then %>
<span class="method-name"><%= methods["callseq"] %></span>
-<% end %>
-<% unless methods["callseq"] then %>
+<% end
+ unless methods["callseq"] then %>
<span class="method-name"><%= methods["name"] %></span><span class="method-args"><%= methods["params"] %></span>
-<% end %>
-<% if methods["codeurl"] then %>
+<% end
+ if methods["codeurl"] then %>
</a>
-<% end %>
-<% if methods["sourcecode"] then %>
+<% end
+ if methods["sourcecode"] then %>
</a>
-<% end %>
+<% end %>
</div>
<div class="method-description">
-<% if methods["m_desc"] then %>
+<% if methods["m_desc"] then %>
<%= methods["m_desc"] %>
-<% end %>
-<% if methods["sourcecode"] then %>
+<% end
+ if methods["sourcecode"] then %>
<p><a class="source-toggle" href="#"
onclick="toggleCode('<%= methods["aref"] %>-source');return false;">[Source]</a></p>
<div class="method-source-code" id="<%= methods["aref"] %>-source">
@@ -589,17 +583,17 @@ EOF
<%= methods["sourcecode"] %>
</pre>
</div>
-<% end %>
+<% end %>
</div>
</div>
-<% end # method_list["methods"] %>
-<% end %>
-<% end # sections["method_list"] %>
+<% end %><%# method_list["methods"] %><%
+ end
+ end %><%# sections["method_list"] %>
</div>
-<% end %>
-<% end # values["sections"] %>
+<% end %>
+<% end %><%# values["sections"] %>
EOF
#####################################################################
@@ -663,7 +657,7 @@ EOF
<div id="index-entries">
<% values["entries"].each do |entries| %>
<a href="<%= entries["href"] %>"><%= entries["name"] %></a><br />
-<% end # values["entries"] %>
+<% end %><%# values["entries"] %>
</div>
</div>
</body>