|
1 | 1 | <body id="top" role="document"> |
2 | 2 | <%= render '_topbar.rhtml' %> |
3 | | - <%= render '_navigation.rhtml' %> |
| 3 | + <div class="wrapper"> |
| 4 | + <%= render '_navigation.rhtml' %> |
4 | 5 |
|
5 | | - <main role="main" aria-labelledby="<%=h klass.aref %>"> |
6 | | - <article> |
7 | | - <h1 id="<%=h klass.aref %>"> |
8 | | - <%= klass.type %> <%= klass.full_name %> |
9 | | - </h1> |
| 6 | + <main role="main" aria-labelledby="<%=h klass.aref %>"> |
| 7 | + <article> |
| 8 | + <h1 id="<%=h klass.aref %>"> |
| 9 | + <%= klass.type %> <%= klass.full_name %> |
| 10 | + </h1> |
10 | 11 |
|
11 | | - <%= klass.description %> |
| 12 | + <%= klass.description %> |
12 | 13 |
|
13 | | - <%- klass.each_section do |section, constants, attributes| -%> |
14 | | - |
15 | | - <%- if section.title then -%> |
16 | | - <h2><%= section.title %></h2> |
17 | | - <%- end -%> |
| 14 | + <%- klass.each_section do |section, constants, attributes| -%> |
| 15 | + |
| 16 | + <%- if section.title then -%> |
| 17 | + <h2><%= section.title %></h2> |
| 18 | + <%- end -%> |
18 | 19 |
|
19 | | - <%- if section.comment then -%> |
20 | | - <div><%= section.description %></div> |
21 | | - <%- end -%> |
| 20 | + <%- if section.comment then -%> |
| 21 | + <div><%= section.description %></div> |
| 22 | + <%- end -%> |
22 | 23 |
|
23 | | - <%- unless constants.empty? then -%> |
24 | | - <section class="constants-list"> |
25 | | - <header> |
26 | | - <h2>Constants</h2> |
27 | | - </header> |
28 | | - <dl> |
29 | | - <%- constants.each do |const| -%> |
30 | | - <dt id="<%= const.name %>"><%= const.name %></dt> |
31 | | - <%- if const.comment then -%> |
32 | | - <dd><%= const.description.strip %></dd> |
33 | | - <%- else -%> |
34 | | - <dd class="missing-docs">(Not documented)</dd> |
35 | | - <%- end -%> |
36 | | - <%- end -%> |
37 | | - </dl> |
38 | | - </section> |
39 | | - <%- end -%> |
40 | | - |
41 | | - <%- unless attributes.empty? then -%> |
42 | | - <section class="attribute-method-details" class="method-section"> |
43 | | - <header> |
44 | | - <h2>Attributes</h2> |
45 | | - </header> |
46 | | - <%- attributes.each do |attrib| -%> |
47 | | - <div id="<%= attrib.aref %>" class="method-detail"> |
48 | | - <div class="method-heading attribute-method-heading"> |
49 | | - <span class="method-name"><%= h attrib.name %></span> |
50 | | - <span class="attribute-access-type">[<%= attrib.rw %>]</span> |
51 | | - </div> |
52 | | - |
53 | | - <div class="method-description"> |
54 | | - <%- if attrib.comment then -%> |
55 | | - <%= attrib.description.strip %> |
| 24 | + <%- unless constants.empty? then -%> |
| 25 | + <section class="constants-list"> |
| 26 | + <header> |
| 27 | + <h2>Constants</h2> |
| 28 | + </header> |
| 29 | + <dl> |
| 30 | + <%- constants.each do |const| -%> |
| 31 | + <dt id="<%= const.name %>"><%= const.name %></dt> |
| 32 | + <%- if const.comment then -%> |
| 33 | + <dd><%= const.description.strip %></dd> |
56 | 34 | <%- else -%> |
57 | | - <p class="missing-docs">(Not documented)</p> |
| 35 | + <dd class="missing-docs">(Not documented)</dd> |
58 | 36 | <%- end -%> |
59 | | - </div> |
60 | | - </div> |
61 | | - <%- end -%> |
62 | | - </section> |
63 | | - <%- end -%> |
64 | | - |
65 | | - <%- klass.methods_by_type(section).each do |type, visibilities| |
66 | | - next if visibilities.empty? |
67 | | - visibilities.each do |visibility, methods| |
68 | | - next if methods.empty? %> |
69 | | - <section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section"> |
70 | | - <header> |
71 | | - <h2><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h2> |
72 | | - </header> |
| 37 | + <%- end -%> |
| 38 | + </dl> |
| 39 | + </section> |
| 40 | + <%- end -%> |
73 | 41 |
|
74 | | - <%- methods.each do |method| -%> |
75 | | - <div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>"> |
76 | | - <div class="method-header"> |
77 | | - <%- if (call_seq = method.call_seq) then -%> |
78 | | - <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%> |
79 | | - <div class="method-heading"> |
80 | | - <span class="method-callseq"> |
81 | | - <%= h(call_seq.strip. |
82 | | - gsub( /^\w+\./m, '')). |
83 | | - gsub(/(.*)[-=]>/, '\1→') %> |
84 | | - </span> |
85 | | - </div> |
86 | | - <%- end -%> |
87 | | - <%- elsif method.has_call_seq? then -%> |
88 | | - <div class="method-heading"> |
89 | | - <span class="method-name"><%= h method.name %></span> |
90 | | - </div> |
91 | | - <%- else -%> |
92 | | - <div class="method-heading"> |
93 | | - <span class="method-name"><%= h method.name %></span> |
94 | | - <span class="method-args"><%= h method.param_seq %></span> |
95 | | - </div> |
96 | | - <%- end -%> |
97 | | - </div> |
| 42 | + <%- unless attributes.empty? then -%> |
| 43 | + <section class="attribute-method-details" class="method-section"> |
| 44 | + <header> |
| 45 | + <h2>Attributes</h2> |
| 46 | + </header> |
| 47 | + <%- attributes.each do |attrib| -%> |
| 48 | + <div id="<%= attrib.aref %>" class="method-detail"> |
| 49 | + <div class="method-heading attribute-method-heading"> |
| 50 | + <span class="method-name"><%= h attrib.name %></span> |
| 51 | + <span class="attribute-access-type">[<%= attrib.rw %>]</span> |
| 52 | + </div> |
98 | 53 |
|
99 | | - <%- unless method.skip_description? then -%> |
100 | 54 | <div class="method-description"> |
101 | | - <%- if method.comment then -%> |
102 | | - <%= method.description.strip %> |
| 55 | + <%- if attrib.comment then -%> |
| 56 | + <%= attrib.description.strip %> |
103 | 57 | <%- else -%> |
104 | 58 | <p class="missing-docs">(Not documented)</p> |
105 | 59 | <%- end -%> |
106 | | - <%- if method.calls_super then -%> |
107 | | - <div class="method-calls-super"> |
108 | | - Calls superclass method <%= method.superclass_method ? method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil %> |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + <%- end -%> |
| 63 | + </section> |
| 64 | + <%- end -%> |
| 65 | + |
| 66 | + <%- klass.methods_by_type(section).each do |type, visibilities| |
| 67 | + next if visibilities.empty? |
| 68 | + visibilities.each do |visibility, methods| |
| 69 | + next if methods.empty? %> |
| 70 | + <section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section"> |
| 71 | + <header> |
| 72 | + <h2><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h2> |
| 73 | + </header> |
| 74 | + |
| 75 | + <%- methods.each do |method| -%> |
| 76 | + <div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>"> |
| 77 | + <div class="method-header"> |
| 78 | + <%- if (call_seq = method.call_seq) then -%> |
| 79 | + <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%> |
| 80 | + <div class="method-heading"> |
| 81 | + <span class="method-callseq"> |
| 82 | + <%= h(call_seq.strip. |
| 83 | + gsub( /^\w+\./m, '')). |
| 84 | + gsub(/(.*)[-=]>/, '\1→') %> |
| 85 | + </span> |
| 86 | + </div> |
| 87 | + <%- end -%> |
| 88 | + <%- elsif method.has_call_seq? then -%> |
| 89 | + <div class="method-heading"> |
| 90 | + <span class="method-name"><%= h method.name %></span> |
109 | 91 | </div> |
110 | | - <%- end -%> |
111 | | - <%- if method.token_stream then -%> |
112 | | - <button class="toggle-source">toggle source</button> |
113 | | - <div class="method-source-code" id="<%= method.html_name %>-source"> |
114 | | - <pre><%= method.markup_code %></pre> |
| 92 | + <%- else -%> |
| 93 | + <div class="method-heading"> |
| 94 | + <span class="method-name"><%= h method.name %></span> |
| 95 | + <span class="method-args"><%= h method.param_seq %></span> |
115 | 96 | </div> |
116 | 97 | <%- end -%> |
117 | 98 | </div> |
118 | | - <%- end -%> |
119 | 99 |
|
120 | | - <%- unless method.aliases.empty? then -%> |
121 | | - <div class="aliases"> |
122 | | - Also aliased as: <%= method.aliases.map do |aka| |
123 | | - if aka.parent then # HACK lib/rexml/encodings |
124 | | - %{<a href="#{klass.aref_to aka.path}">#{h aka.name}</a>} |
125 | | - else |
126 | | - h aka.name |
127 | | - end |
128 | | - end.join ", " %> |
129 | | - </div> |
130 | | - <%- end -%> |
| 100 | + <%- unless method.skip_description? then -%> |
| 101 | + <div class="method-description"> |
| 102 | + <%- if method.comment then -%> |
| 103 | + <%= method.description.strip %> |
| 104 | + <%- else -%> |
| 105 | + <p class="missing-docs">(Not documented)</p> |
| 106 | + <%- end -%> |
| 107 | + <%- if method.calls_super then -%> |
| 108 | + <div class="method-calls-super"> |
| 109 | + Calls superclass method <%= method.superclass_method ? method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil %> |
| 110 | + </div> |
| 111 | + <%- end -%> |
| 112 | + <%- if method.token_stream then -%> |
| 113 | + <button class="toggle-source">toggle source</button> |
| 114 | + <div class="method-source-code" id="<%= method.html_name %>-source"> |
| 115 | + <pre><%= method.markup_code %></pre> |
| 116 | + </div> |
| 117 | + <%- end -%> |
| 118 | + </div> |
| 119 | + <%- end -%> |
131 | 120 |
|
132 | | - <%- if method.is_alias_for then -%> |
133 | | - <div class="aliases"> |
134 | | - Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a> |
135 | | - </div> |
136 | | - <%- end -%> |
137 | | - </div> |
138 | | - <%- end -%> |
139 | | - </section> |
140 | | - <%- end |
141 | | - end %> |
142 | | - <%- end -%> |
143 | | - </article> |
144 | | - <nav class="contextual"> |
145 | | - <%= render '_sidebar_parent.rhtml' %> |
146 | | - <%= render '_sidebar_includes.rhtml' %> |
147 | | - <%= render '_sidebar_table_of_contents.rhtml' %> |
148 | | - <%= render '_sidebar_sections.rhtml' %> |
149 | | - <%= render '_sidebar_extends.rhtml' %> |
150 | | - <%= render '_sidebar_constants.rhtml' %> |
151 | | - <%= render '_sidebar_methods.rhtml' %> |
152 | | - </nav> |
153 | | - </main> |
| 121 | + <%- unless method.aliases.empty? then -%> |
| 122 | + <div class="aliases"> |
| 123 | + Also aliased as: <%= method.aliases.map do |aka| |
| 124 | + if aka.parent then # HACK lib/rexml/encodings |
| 125 | + %{<a href="#{klass.aref_to aka.path}">#{h aka.name}</a>} |
| 126 | + else |
| 127 | + h aka.name |
| 128 | + end |
| 129 | + end.join ", " %> |
| 130 | + </div> |
| 131 | + <%- end -%> |
| 132 | + |
| 133 | + <%- if method.is_alias_for then -%> |
| 134 | + <div class="aliases"> |
| 135 | + Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a> |
| 136 | + </div> |
| 137 | + <%- end -%> |
| 138 | + </div> |
| 139 | + <%- end -%> |
| 140 | + </section> |
| 141 | + <%- end |
| 142 | + end %> |
| 143 | + <%- end -%> |
| 144 | + </article> |
| 145 | + <nav class="contextual"> |
| 146 | + <%= render '_sidebar_parent.rhtml' %> |
| 147 | + <%= render '_sidebar_includes.rhtml' %> |
| 148 | + <%= render '_sidebar_table_of_contents.rhtml' %> |
| 149 | + <%= render '_sidebar_sections.rhtml' %> |
| 150 | + <%= render '_sidebar_extends.rhtml' %> |
| 151 | + <%= render '_sidebar_constants.rhtml' %> |
| 152 | + <%= render '_sidebar_methods.rhtml' %> |
| 153 | + </nav> |
| 154 | + </main> |
| 155 | + </div> |
154 | 156 | </body> |
0 commit comments