<% unless (description = context.description).empty? %>
<%= description %>
<% end %> <% unless context.requires.empty? %>
Required Files
<% end %> <% sections = context.sections.select { |s| s.title }.sort_by{ |s| s.title.to_s } %> <% unless sections.empty? then %>
Sections
<% end %> <% unless context.classes_and_modules.empty? %>
Namespace
<% end %> <% unless context.method_list.empty? %>
Methods
<% each_letter_group(context.method_list) do |group| %>
<%= group[:name] %>
    <% group[:methods].each_with_index do |method, i| %> <% comma = group[:methods].size == i+1 ? '' : ',' %>
  • <%= h method.name %><%= comma %>
  • <% end %>
<% end %>
<% end %> <% unless context.includes.empty? %>
Included Modules
<% end %> <% context.each_section do |section, constants, attributes| %> <% if section.title then %>
<%= h section.title %>
<% end %> <% if section.comment then %>
<%= section.description %>
<% end %> <% unless constants.empty? %>
Constants
<% context.each_constant do |const| %> <% if const.comment %> <% end %> <% end %>
<%= h const.name %> = <%= h const.value %>
  <%= const.description.strip %>
<% end %> <% unless attributes.empty? %>
Attributes
<% attributes.each do |attrib| %> <% end %>
[<%= attrib.rw %>] <%= h attrib.name %> <%= attrib.description.strip %>
<% end %> <% context.methods_by_type(section).each do |type, visibilities| next if visibilities.empty? visibilities.each do |visibility, methods| next if methods.empty? %>
<%= type.capitalize %> <%= visibility.to_s.capitalize %> methods
<% methods.each do |method| %>
<% if method.call_seq %> <%= method.call_seq.gsub(/->/, '→') %> <% else %> <%= h method.name %><%= h method.params %> <% end %> " name="<%= method.aref %>" class="permalink">Link
<% if method.comment %>
<%= method.description.strip %>
<% end %> <% unless method.aliases.empty? %>
Also aliased as: <%= method.aliases.map do |aka| if aka.parent then # HACK lib/rexml/encodings %{#{h aka.name}} else h aka.name end end.join ", " %>
<% end %> <% if method.token_stream %> <% markup = method.sdoc_markup_code %>
<% # generate github link github = if options.github if markup =~ /File\s(\S+), line (\d+)/ path = $1 line = $2.to_i end path && github_url(path) else false end %>
<%= markup %>
<% end %>
<% end #methods.each %> <% end #visibilities.each %> <% end #context.methods_by_type %> <% end #context.each_section %>