<% unless (desc = context.description).empty? %>
<%= desc %>
<% end %> <% unless context.requires.empty? %>
Required Files
<% end %> <% sections = context.sections.select { |section| section.title } %> <% unless sections.empty? %>
Contents
<% end %> <% list = context.method_list list = list.find_all {|m| m.visibility == :public || m.visibility == :protected || m.force_documentation } %> <% unless list.empty? %>
Methods
<% each_letter_group(list) do |group| %>
<%= group[:name] %>
    <% group[:methods].each_with_index do |method, i| %>
  • <%= method.name %><%= ',' unless group[:methods].size == i+1 %>
  • <% end %>
<% end %>
<% end %> <% unless context.includes.empty? %>
Included Modules
<% end %> <% sections.each do |section| %>
<%= h section.title %>
<% unless (description = section.description).empty? %>
<%= description %>
<% end %> <% end %> <% unless context.classes_and_modules.empty? %>
Classes and Modules
<% end %> <% unless context.constants.empty? %>
Constants
<% context.each_constant do |const| %> <% unless (description = const.description).empty? %> <% end %> <% end %>
<%= h const.name %> = <%= h const.value %>
  <%= description %>
<% end %> <% unless context.attributes.empty? %>
Attributes
<% context.each_attribute do |attrib| %> <% end %>
[<%= attrib.rw %>] <%= h attrib.name %> <%= attrib.description.strip %>
<% end %> <% context.methods_by_type.each do |type, visibilities| next if visibilities.empty? visibilities.each do |visibility, methods| next if methods.empty? next unless visibility == :public || visibility == :protected || methods.any? {|m| m.force_documentation } %>
<%= 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 %>
<% unless (description = method.description).empty? %>
<%= description %>
<% end %> <% unless method.aliases.empty? %>
This method is also aliased as <% method.aliases.each do |aka| %> <%= h aka.name %> <% end %>
<% end %> <% if method.token_stream %> <% markup = method.markup_code %>
<%= method.markup_code %>
<% end %>
<% end end end %>