require 'rdoc/generators/html' module RDoc::Generators::HTML::KILMER FONTS = "Verdana, Arial, Helvetica, sans-serif" STYLE = <<-EOF body,td,p { font-family: <%= values["fonts"] %>; color: #000040; } .attr-rw { font-size: xx-small; color: #444488 } .title-row { background-color: #CCCCFF; color: #000010; } .big-title-font { color: black; font-weight: bold; font-family: <%= values["fonts"] %>; font-size: large; height: 60px; padding: 10px 3px 10px 3px; } .small-title-font { color: black; font-family: <%= values["fonts"] %>; font-size:10; } .aqua { color: black } .method-name, .attr-name { font-family: font-family: <%= values["fonts"] %>; font-weight: bold; font-size: small; margin-left: 20px; color: #000033; } .tablesubtitle, .tablesubsubtitle { width: 100%; margin-top: 1ex; margin-bottom: .5ex; padding: 5px 0px 5px 3px; font-size: large; color: black; background-color: #CCCCFF; border: thin; } .name-list { margin-left: 5px; margin-bottom: 2ex; line-height: 105%; } .description { margin-left: 5px; margin-bottom: 2ex; line-height: 105%; font-size: small; } .methodtitle { font-size: small; font-weight: bold; text-decoration: none; color: #000033; background-color: white; } .srclink { font-size: small; font-weight: bold; text-decoration: none; color: #0000DD; background-color: white; } .paramsig { font-size: small; } .srcbut { float: right } EOF BODY = <<-EOF <%= values["title"] %> "> " type="text/css" media="screen" /> <%= template_include %> <% if values["diagram"] then %>
<%= values["diagram"] %>
<% end %> <% if values["description"] then %>
<%= values["description"] %>
<% end %> <% if values["requires"] then %>
Required files

<% values["requires"].each do |requires| %> <%= href requires["aref"], requires["name"] %> <% end # values["requires"] %> <% end %>
<% if values["methods"] then %>
Methods

<% values["methods"].each do |methods| %> <%= href methods["aref"], methods["name"] %>, <% end # values["methods"] %>
<% end %> <% values["sections"].each do |sections| %>
<% if sections["sectitle"] then %>

"><%= sections["sectitle"] %>

<% if sections["seccomment"] then %>
<%= sections["seccomment"] %>
<% end %> <% end %> <% if sections["attributes"] then %>
Attributes

<% sections["attributes"].each do |attributes| %> <% if attributes["rw"] then %> <% end %> <% unless attributes["rw"] then %> <% end %> <% end # sections["attributes"] %>
 [<%= attributes["rw"] %>] <%= attributes["name"] %> <%= attributes["a_desc"] %>
<% end %> <% if sections["classlist"] then %>
Classes and Modules

<%= sections["classlist"] %>
<% end %> <%= template_include %> <% end # values["sections"] %> EOF FILE_PAGE = <<-EOF
File
<%= values["short_name"] %>
Path: <%= values["full_path"] %> <% if values["cvsurl"] then %>  (">CVS) <% end %>
Modified: <%= values["dtm_modified"] %>

EOF CLASS_PAGE = <<-EOF
<%= values["classmod"] %>
<%= values["full_name"] %>
<% if values["parent"] then %> <% end %>
In: <% values["infiles"].each do |infiles| %> <%= href infiles["full_path_url"], infiles["full_path"] %> <% if infiles["cvsurl"] then %>  (">CVS) <% end %> <% end # values["infiles"] %>
Parent: <% if values["par_url"] then %> " class="cyan"> <% end %> <%= values["parent"] %> <% if values["par_url"] then %> <% end %>

EOF METHOD_LIST = <<-EOF <% if values["includes"] then %>
Included modules

<% values["includes"].each do |includes| %> <%= href includes["aref"], includes["name"] %> <% end # values["includes"] %>
<% end %> <% if values["method_list"] then %> <% values["method_list"].each do |method_list| $stderr.puts({ :method_list => method_list }.inspect) %> <% if values["methods"] then %>
<%= values["type"] %> <%= values["category"] %> methods
<% values["methods"].each do |methods| $stderr.puts({ :methods => methods }.inspect) %>
"> <% if values["callseq"] then %> <%= values["callseq"] %> <% end %> <% unless values["callseq"] then %> <%= values["name"] %><%= values["params"] %> <% end %> <% if values["codeurl"] then %> " target="source" class="srclink">src <% end %>
<% if values["m_desc"] then %>
<%= values["m_desc"] %>
<% end %> <% if values["aka"] then %>
This method is also aliased as <% values["aka"].each do |aka| $stderr.puts({ :aka => aka }.inspect) %> "><%= values["name"] %> <% end # values["aka"] %>
<% end %> <% if values["sourcecode"] then %>
<%= values["sourcecode"] %>
<% end %> <% end # values["methods"] %> <% end %> <% end # values["method_list"] %> <% end %> EOF SRC_PAGE = <<-EOF <%= values["title"] %> ">
<%= values["code"] %>
EOF FR_INDEX_BODY = %{ <%= template_include %> } FILE_INDEX = <<-EOF "> <% values["entries"].each do |entries| %> "><%= entries["name"] %>
<% end # values["entries"] %> EOF CLASS_INDEX = FILE_INDEX METHOD_INDEX = FILE_INDEX INDEX = <<-EOF <%= values["title"] %> "> <% if values["inline_source"] then %> " name="docwin"> <% end %> <% unless values["inline_source"] then %> " name="docwin"> <% end %> <body bgcolor="white"> Click <a href="html/index.html">here</a> for a non-frames version of this page. </body> EOF # A blank page to use as a target BLANK = %{ } def write_extra_pages template = TemplatePage.new(BLANK) File.open("blank.html", "w") { |f| template.write_html_on(f, {}) } end end