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