1<body id="top" class="<%= klass.type %>"> 2<nav id="metadata"> 3 <%= render '_sidebar_navigation.rhtml' %> 4 5 <%= render '_sidebar_search.rhtml' %> 6 7 <%= render '_sidebar_table_of_contents.rhtml' %> 8 9 <div id="file-metadata"> 10 <%= render '_sidebar_in_files.rhtml' %> 11 <%= render '_sidebar_VCS_info.rhtml' %> 12 </div> 13 14 <div id="class-metadata"> 15 <%= render '_sidebar_sections.rhtml' %> 16 <%= render '_sidebar_parent.rhtml' %> 17 <%= render '_sidebar_includes.rhtml' %> 18 <%= render '_sidebar_extends.rhtml' %> 19 <%= render '_sidebar_methods.rhtml' %> 20 </div> 21 22 <div id="project-metadata"> 23 <%= render '_sidebar_pages.rhtml' %> 24 <%= render '_sidebar_classes.rhtml' %> 25 </div> 26</nav> 27 28<div id="documentation"> 29 <h1 class="<%= klass.type %>"><%= klass.type %> <%= klass.full_name %></h1> 30 31 <div id="description" class="description"> 32 <%= klass.description %> 33 </div><!-- description --> 34 35 <% klass.each_section do |section, constants, attributes| %> 36 <% constants = constants.select { |const| const.display? } %> 37 <% attributes = attributes.select { |attr| attr.display? } %> 38 <section id="<%= section.aref %>" class="documentation-section"> 39 <% if section.title then %> 40 <div class="documentation-section-title"> 41 <h2 class="section-header"> 42 <%= section.title %> 43 </h2> 44 <span class="section-click-top"> 45 <a href="#top">↑ top</a> 46 </span> 47 </div> 48 <% end %> 49 50 <% if section.comment then %> 51 <div class="description"> 52 <%= section.description %> 53 </div> 54 <% end %> 55 56 <% unless constants.empty? then %> 57 <!-- Constants --> 58 <section id="constants-list" class="section"> 59 <h3 class="section-header">Constants</h3> 60 <dl> 61 <% constants.each do |const| %> 62 <dt id="<%= const.name %>"><%= const.name %> 63 <% if const.comment then %> 64 <dd class="description"><%= const.description.strip %> 65 <% else %> 66 <dd class="description missing-docs">(Not documented) 67 <% end %> 68 <% end %> 69 </dl> 70 </section> 71 <% end %> 72 73 <% unless attributes.empty? then %> 74 <!-- Attributes --> 75 <section id="attribute-method-details" class="method-section section"> 76 <h3 class="section-header">Attributes</h3> 77 78 <% attributes.each do |attrib| %> 79 <div id="<%= attrib.aref %>" class="method-detail"> 80 <div class="method-heading attribute-method-heading"> 81 <span class="method-name"><%= h attrib.name %></span><span 82 class="attribute-access-type">[<%= attrib.rw %>]</span> 83 </div> 84 85 <div class="method-description"> 86 <% if attrib.comment then %> 87 <%= attrib.description.strip %> 88 <% else %> 89 <p class="missing-docs">(Not documented) 90 <% end %> 91 </div> 92 </div> 93 <% end %> 94 </section><!-- attribute-method-details --> 95 <% end %> 96 97 <!-- Methods --> 98 <% klass.methods_by_type(section).each do |type, visibilities| 99 next if visibilities.empty? 100 visibilities.each do |visibility, methods| 101 next if methods.empty? %> 102 <section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section section"> 103 <h3 class="section-header"><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3> 104 105 <% methods.each do |method| %> 106 <div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>"> 107 <% if method.call_seq then %> 108 <% method.call_seq.strip.split("\n").each_with_index do |call_seq, i| %> 109 <div class="method-heading"> 110 <span class="method-callseq"> 111 <%= h(call_seq.strip. 112 gsub( /^\w+\./m, '')). 113 gsub(/(.*)[-=]>/, '\1→') %> 114 </span> 115 <% if i == 0 and method.token_stream then %> 116 <span class="method-click-advice">click to toggle source</span> 117 <% end %> 118 </div> 119 <% end %> 120 <% else %> 121 <div class="method-heading"> 122 <span class="method-name"><%= h method.name %></span><span 123 class="method-args"><%= method.param_seq %></span> 124 <% if method.token_stream then %> 125 <span class="method-click-advice">click to toggle source</span> 126 <% end %> 127 </div> 128 <% end %> 129 130 <div class="method-description"> 131 <% if method.comment then %> 132 <%= method.description.strip %> 133 <% else %> 134 <p class="missing-docs">(Not documented) 135 <% end %> 136 <% if method.calls_super then %> 137 <div class="method-calls-super"> 138 Calls superclass method 139 <%= 140 method.superclass_method ? 141 method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil 142 %> 143 </div> 144 <% end %> 145 146 <% if method.token_stream then %> 147 <div class="method-source-code" id="<%= method.html_name %>-source"> 148 <pre><%= method.markup_code %></pre> 149 </div><!-- <%= method.html_name %>-source --> 150 <% end %> 151 </div> 152 153 <% unless method.aliases.empty? then %> 154 <div class="aliases"> 155 Also aliased as: <%= method.aliases.map do |aka| 156 if aka.parent then # HACK lib/rexml/encodings 157 %{<a href="#{klass.aref_to aka.path}">#{h aka.name}</a>} 158 else 159 h aka.name 160 end 161 end.join ", " %> 162 </div> 163 <% end %> 164 165 <% if method.is_alias_for then %> 166 <div class="aliases"> 167 Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a> 168 </div> 169 <% end %> 170 </div><!-- <%= method.html_name %>-method --> 171 172 <% end %> 173 </section><!-- <%= visibility %>-<%= type %>-method-details --> 174 <% end 175 end %> 176 </section><!-- <%= section.aref %> --> 177<% end %> 178 179</div><!-- documentation --> 180