<% unless (desc = context.description).empty? %>
<%= desc %>
<% end %>
<% unless context.requires.empty? %>
Required Files
<% context.requires.each do |req| %>
- <%= h req.name %>
<% end %>
<% 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
<% context.includes.each do |inc| %>
-
<% unless String === inc.module %>
<%= h inc.module.full_name %>
<% else %>
<%= h inc.name %>
<% end %>
START:includes
<% end %>
<% end %>
<% sections.each do |section| %>
<% unless (description = section.description).empty? %>
<%= description %>
<% end %>
<% end %>
<% unless context.classes_and_modules.empty? %>
Classes and Modules
<% (context.modules.sort + context.classes.sort).each do |mod| %>
- <%= mod.type.upcase %> <%= mod.full_name %>
<% end %>
<% end %>
<% unless context.constants.empty? %>
Constants
<% context.each_constant do |const| %>
<%= h const.name %> |
= |
<%= h const.value %> |
<% unless (description = const.description).empty? %>
|
<%= description %> |
<% end %>
<% end %>
<% end %>
<% unless context.attributes.empty? %>
Attributes
<% context.each_attribute do |attrib| %>
[<%= attrib.rw %>]
|
<%= h attrib.name %> |
<%= attrib.description.strip %> |
<% end %>
<% 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 %>
<% end %>
<% end
end
end
%>