<% 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
unless @options.show_all
list = list.find_all {|m| m.visibility == :public || m.visibility == :protected || m.force_documentation }
end
%>
<% unless list.empty? %>
Functions
<% 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? %>
<%= context.full_name == 'Global' ? 'Index' : 'Classes and Modules' %>
<% 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 @options.show_all || visibility == :public || visibility == :protected || methods.any? {|m| m.force_documentation }
%>
<%= type.capitalize %> <%= visibility.to_s.capitalize %> functions
<% 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 function is also aliased as
<% method.aliases.each do |aka| %>
<%= h aka.name %>
<% end %>
<% end %>
<% if method.token_stream %>
<% markup = method.markup_code %>
<%
codex_links = get_codex_links(method.name)
if codex_links
%>
Codex: <%= codex_links %>
<% end %>
Source: show
<%
if markup =~ /File\s(\S+), line (\d+)/
path = $1
line = $2.to_i
end
github = github_url(path)
if github
%>
| " target="_blank" class="github_url">on GitHub
<% end %>
<%= method.markup_code %>
<% end %>
<% end
end
end
%>