<% 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? %>
Methods
<% 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? %>
<%# TODO delete this dirty hack when documentation for example for JavaScriptHelper will not be cutted off by