<% 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 unless @options.show_all list = list.find_all {|m| m.visibility == :public || m.visibility == :protected || m.force_documentation } end %> <% 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? %>
<%# TODO delete this dirty hack when documentation for example for JavaScriptHelper will not be cutted off by