<?xml version=“1.0” encoding=“utf-8”?> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns=“www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”> <head>

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

<title><%= classinfo[:classmod] %>: <%= classinfo[:full_name] %></title>

<link rel="stylesheet" href="<%= rel_prefix %>/rdoc.css" type="text/css" media="screen" />

<script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript" 
        charset="utf-8"></script>
<script src="<%= rel_prefix %>/js/thickbox-compressed.js" type="text/javascript" 
        charset="utf-8"></script>
<script src="<%= rel_prefix %>/js/quicksearch.js" type="text/javascript" 
        charset="utf-8"></script>
<script src="<%= rel_prefix %>/js/darkfish.js" type="text/javascript" 
        charset="utf-8"></script>

</head> <body class=“<%= classinfo.downcase %>”>

<div id="metadata">
        <div id="file-metadata">
                <div id="file-list-section" class="section">
                        <h3 class="section-header">In Files</h3>
                        <div class="section-body">
                                <ul>
                                <% classinfo[:infiles].each do |file| %>
                                        <li><a href="<%= rel_prefix %>/<%= file[:full_path] %>.html?TB_iframe=true&amp;height=550&amp;width=785"
                                                class="thickbox" title="<%= file[:full_path] %>"><%= file[:full_path] %></a></li>
                                <% end %>
                                </ul>
                        </div>
                </div>

                <% if !svninfo.empty? %>
                <div id="file-svninfo-section" class="section">
                        <h3 class="section-header">Subversion Info</h3>
                        <div class="section-body">
                                <dl class="svninfo">
                                        <dt>Rev</dt>
                                        <dd><%= svninfo[:rev] %></dd>

                                        <dt>Last Checked In</dt>
                                        <dd><%= svninfo[:commitdate].strftime('%Y-%m-%d %H:%M:%S') %> 
                                                (<%= svninfo[:commitdelta] %> ago)</dd>

                                        <dt>Checked in by</dt>
                                        <dd><%= svninfo[:committer] %></dd>
                                </dl>
                        </div>
                </div>
                <% end %>
        </div>

        <div id="class-metadata">

                <!-- Parent Class -->
                <% if classinfo[:classmod] == 'Class' %>
                <div id="parent-class-section" class="section">
                        <h3 class="section-header">Parent</h3>
                        <% if classinfo[:par_url] %>
                        <p class="link"><a href="<%= classinfo[:par_url] %>"><%= classinfo[:parent] %></a></p>
                        <% else %>
                        <p class="link"><%= classinfo[:parent] %></p>
                        <% end %>
                </div>
                <% end %>

                <!-- Namespace Contents -->
                <% if classinfo[:sections].first.key?( :classlist ) %>
                <div id="namespace-list-section" class="section">
                        <h3 class="section-header">Namespace</h3>
                        <ul class="link-list">
                                <% classinfo[:sections].first[:classlist].each do |desc| %>
                                <li><%= desc.sub(/^(\w+)/, %Q{<span class="type">\\1</span>}) %></li>
                                <% end %>
                        </ul>
                </div>
                <% end %>

                <!-- Method Quickref -->
                <% if classinfo.key?( :methods ) %>
                <div id="method-list-section" class="section">
                        <h3 class="section-header">Methods</h3>
                        <ul class="link-list">
                                <% classinfo[:methods].each do |meth| %>
                                <li><a href="#<%= meth[:name] %>"><%= meth[:name] %></a></li>
                                <% end %>
                        </ul>
                </div>
                <% end %>

                <!-- Included Modules -->
                <% if classinfo[:includes] %>
                <div id="includes-section" class="section">
                        <h3 class="section-header">Included Modules</h3>
                        <ul class="link-list">
                        <% classinfo[:includes].each do |inc| %>
                        <% if inc[:aref].nil? %>
                                <li><span class="include"><%= inc[:name] %></span></li>
                        <% else %>
                                <li><a class="include" href="<%= inc[:aref] %>"><%= inc[:name] %></a></li>
                        <% end %>
                        <% end %>
                        </ul>
                </div>
                <% end %>
        </div>

        <div id="project-metadata">
                <% simple_files = files.select {|_, file| file[:parser] == RDoc::Parser::Simple } %>
                <% unless simple_files.empty? then %>
                <div id="fileindex-section" class="section project-section">
                        <h3 class="section-header">Files</h3>
                        <ul>
                        <% simple_files.sort_by {|name,_| name }.each do |name, file| %>
                                <li class="file"><a href="<%= rel_prefix %>/<%= file[:short_name] %>.html"><%= h file[:short_name] %></a></li>
                        <% end %>
                        </ul>
                </div>
                <% end %>

                <div id="classindex-section" class="section project-section">
                        <h3 class="section-header">Class Index 
                                <span class="search-toggle"><img src="<%= rel_prefix %>/images/find.png" 
                                        height="16" width="16" alt="[+]" 
                                        title="show/hide quicksearch" /></span></h3>
                        <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
                        <fieldset>
                                <legend>Quicksearch</legend>
                                <input type="text" name="quicksearch" value="" 
                                        class="quicksearch-field" />
                        </fieldset>
                        </form>

                        <ul class="link-list">
                        <% modsort.each do |cname| %>
                        <% cinfo = classes[cname] %>
                                <li><a href="<%= rel_prefix %>/<%= cinfo[:outfile] %>"><%= cname %></a></li>
                        <% end %>
                        </ul>
                        <div id="no-class-search-results" style="display: none;">No matching classes.</div>
                </div>

                <% if $DEBUG %>
                <div id="debugging-toggle"><img src="<%= rel_prefix %>/images/bug.png" 
                        alt="toggle debugging" height="16" width="16" /></div>
                <% end %>
        </div>
</div>

<div id="documentation">
        <% if classinfo[:classmod] == 'Class' %>
        <h1 class="class"><%= classinfo[:full_name] %></h1>
        <% else %>
        <h1 class="module"><%= classinfo[:full_name] %></h1>
        <% end %>

        <div id="description">
                <%= classinfo[:description] %>
        </div>

        <!-- Constants -->
        <% if classinfo[:sections].first[:constants] %>
        <div id="constants-list" class="section">
                <h3 class="section-header">Constants</h3>
                <dl>
                <% classinfo[:sections].first[:constants].each do |const| %>
                        <dt><a name="<%= const[:name] %>"><%= const[:name] %></a></dt>
                        <% if const[:desc] %>
                        <dd class="description"><%= const[:desc].strip %></dd>
                        <% else %>
                        <dd class="description missing-docs">(Not documented)</dd>
                        <% end %>
                <% end %>
                </dl>
        </div>
        <% end %>

        <!-- Attributes -->
        <% if classinfo[:sections].first[:attributes] %>
        <div id="attribute-method-details" class="method-section section">
                <h3 class="section-header">Attributes</h3>

                <% classinfo[:sections].first[:attributes].each do |attrib| %>
                <div id="<%= attrib[:name].downcase.gsub(/[^a-z]+/, '-') %>-attribute-method" class="method-detail">
                        <a name="<%= attrib[:name] %>"></a>
                        <% if attrib[:rw] =~ /w/i %>
                        <a name="<%= attrib[:name] %>="></a>
                        <% end %>
                        <div class="method-heading attribute-method-heading">
                                <span class="method-name"><%= h attrib[:name] %></span><span 
                                        class="attribute-access-type">[<%= attrib[:rw] %>]</span>
                        </div>

                        <div class="method-description">
                        <% if attrib[:a_desc] && !attrib[:a_desc].empty? %>
                        <%= attrib[:a_desc].strip %>
                        <% else %>
                        <p class="missing-docs">(Not documented)</p>
                        <% end %>
                        </div>
                </div>
                <% end %>
        </div>
        <% end %>

        <!-- Methods -->
        <% if classinfo[:sections].first[:method_list] %>
        <% classinfo[:sections].first[:method_list].each do |methodlist| %>
        <div id="<%= methodlist[:type].downcase %>-<%= methodlist[:category].downcase %>-method-details" class="method-section section">
                <h3 class="section-header"><%= methodlist[:type] %> <%= methodlist[:category] %> Methods</h3>

        <% methodlist[:methods].each do |methodinfo| %>

        <%
        # If the method doesn't have a 'name' attribute, it's defined in C, so make one out of the
        # first method name in the callseq.
        unless methodinfo[:name] 
                methodinfo[:name] = methodinfo[:callseq][/^.*?\.(\w+)/, 1] || methodinfo[:callseq]
        end

        %>
                <% if methodinfo[:m_desc] =~ /Alias for/ %>
                <div id="<%= methodinfo[:name].gsub( /[^a-z]+/, '-' ) %>-method" class="method-detail method-alias">
                <% else %>
                <div id="<%= methodinfo[:name].gsub( /[^a-z]+/, '-' ) %>-method" class="method-detail">
                <% end %>
                        <a name="<%= methodinfo[:name] %>"></a>

                        <div class="method-heading">
                        <% if methodinfo[:callseq] %>
                                <span class="method-callseq"><%= methodinfo[:callseq].strip.gsub( /^\w.*?\./m, '') %></span>
                                <span class="method-click-advice">click to toggle source</span>
                        <% else %>
                                <span class="method-name"><%= methodinfo[:name] %></span><span 
                                        class="method-args"><%= methodinfo[:params] %></span>
                                <span class="method-click-advice">click to toggle source</span>
                        <% end %>
                        </div>

                        <div class="method-description">
                                <% if methodinfo[:m_desc] %>
                                <%= methodinfo[:m_desc].strip.gsub(%r{<a href="(.*?)#\w+">(.*?)</a>}) do |m|
                                        %{<a class="xref" href="#$1#$2">#$2</a>}
                                end
                                %>
                                <% else %>
                                <p class="missing-docs">(Not documented)</p>
                                <% end %>

                                <% if methodinfo[:sourcecode] %>
                                <div class="method-source-code" 
                                        id="<%= methodinfo[:name].gsub( /[^a-z]+/, '-' ) %>-source">

<pre> <%= methodinfo %> </pre>

                                </div>
                                <% end %>
                        </div>

                        <% if methodinfo[:aka] %>
                        <div class="aliases">
                                Also aliased as: <%= methodinfo[:aka].collect do |aliasinfo|
                                        %{<a class="xref alias" href="##{aliasinfo[:name]}">##{aliasinfo[:name]}</a>}
                                end.join(", ") %>
                        </div>
                        <% end %>
                </div>

        <% end %>
        </div>
<% end %>
<% end %>

</div>

<div id="rdoc-debugging-section-dump" class="debugging-section">
<% if $DEBUG %>
<% classinfo[:sections].first.keys.each do |section| %>
        <div class="section">
        <h2 class="section-header"><%= section %></h2>

        <pre><%= h classinfo[:sections].first[section].to_yaml %></pre>
        </div>
<% end %>
<% else %>
        <p>Disabled; run with $DEBUG to generate this.</p>
<% end %>
</div>

<div id="validator-badges">
        <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
        <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish 
                Rdoc Generator</a> <%= RDoc::Generator::Darkfish::VERSION %></small>.</p>
</div>

</body> </html>