<% d = @doc_instance %> <% @title = "#{d.full_name} #{d.type}" %> <%= include "partials/breadcrumbs", :object => d %>

<%= d.type %> <%= d.full_name %>

<% # Does it have a description? %> <% if d.description && !d.description.empty? %>

Description

<%= htmlize(d.description) %>
<% end %> <% # Is it a CLASS? %> <% if @doc_instance.is_a?(Documentation::Klass) %> <% if @doc_instance.superklass %>

Superclass

<%= auto_link_code(d.superklass, false) %>

<% end %> <% unless @doc_instance.subklasses.empty? %>

Subclasses

<%= d.subklasses.map { |s| auto_link_code(s, false) }.join(', ') %>

<% end %> <% end %> <% # Does it have MIXINS? %> <% unless @doc_instance.mixins.empty? %>

Includes

<%= d.mixins.map { |m| auto_link_code(m, false) }.join(', ') %>

<% end %> <% # Are there related utilities? %> <% unless @doc_instance.related_utilities.empty? %>

Related utilities

<%= d.related_utilities.map { |u| auto_link_code(u, false) }.join(', ') %>

<% end %> <% # List its methods. %> <% unless d.all_methods.empty? && d.mixins.empty? %>

Methods

<% unless @doc_instance.mixins.compact.empty? %> <% d.mixins.each do |mixin| %>

Inherited from <%= auto_link(mixin) %>

<% end %> <% end %>
<% end %> <% if d.is_a?(Documentation::Klass) && d.constructor %>

Constructor

<%= d.constructor.ebnf_expressions.join("\n").strip %>
<% unless d.constructor.arguments.empty? %> <% end %>

<%= htmlize(d.constructor.description) %>

<% end %> <% types = { :constants => "Constants", :klass_methods => "Class methods", :klass_properties => "Class properties", :instance_methods => "Instance methods", :instance_properties => "Instance properties" } %> <% types.each do |method, title| %> <% methods = d.send(method) %> <% unless methods.empty? %>

<%= title %>

<% end %> <% end %>