-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
box_info.erb
45 lines (44 loc) · 1.7 KB
/
box_info.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<% n = 1 %>
<dl class="box">
<% if CodeObjects::ClassObject === object && object.superclass %>
<dt class="r<%=n%>">Inherits:</dt>
<dd class="r<%=n%>">
<span class="inheritName"><%= linkify object.superclass %></span>
<% if object.superclass.name != :BasicObject %>
<ul class="fullTree">
<li><%= linkify P(:Object) %></li>
<% object.inheritance_tree.reverse.each_with_index do |obj, i| %>
<li class="next"><%= obj == object ? obj.path : linkify(obj) %></li>
<% end %>
</ul>
<a href="#" class="inheritanceTree">show all</a>
<% end %>
</dd>
<% n = 2 %>
<% end %>
<% [[:class, "Extended by"], [:instance, "Includes"]].each do |scope, name| %>
<% if (mix = run_verifier(object.mixins(scope))).size > 0 %>
<dt class="r<%=n%>"><%= name %>:</dt>
<dd class="r<%=n%>"><%= mix.sort_by {|o| o.path }.map {|o| linkify(o) }.join(", ") %></dd>
<% n = n == 2 ? 1 : 2 %>
<% end %>
<% end %>
<% if (mixed_into = mixed_into(object)).size > 0 %>
<dt class="r<%=n%>">Included in:</dt>
<dd class="r<%=n%>"><%= mixed_into.sort_by {|o| o.path }.map {|o| linkify(o) }.join(", ") %></dd>
<% n = n == 2 ? 1 : 2 %>
<% end %>
<% if object.has_tag?(:service) %>
<dt class="r<%=n%>">Identifier:</dt>
<dd class="r<%=n%>"><%= object.tag(:service).text %></dd>
<% n = n == 2 ? 1 : 2 %>
<dt class="r<%=n%>">API Version:</dt>
<dd class="r<%=n%>"><%= object.tag(:version).text %></dd>
<% n = n == 2 ? 1 : 2 %>
<% end %>
<% unless object.root? %>
<dt class="r<%=n%> last">Defined in:</dt>
<dd class="r<%=n%> last"><%= erb(:defines) %></dd>
<% end %>
</dl>
<div class="clear"></div>