diff options
Diffstat (limited to 'lib/rdoc/generator/template/darkfish/class.rhtml')
-rw-r--r-- | lib/rdoc/generator/template/darkfish/class.rhtml | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/lib/rdoc/generator/template/darkfish/class.rhtml b/lib/rdoc/generator/template/darkfish/class.rhtml index 6c64ba6c98..26652cada9 100644 --- a/lib/rdoc/generator/template/darkfish/class.rhtml +++ b/lib/rdoc/generator/template/darkfish/class.rhtml @@ -101,35 +101,42 @@ <div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>"> <div class="method-header"> <%- if (call_seq = method.call_seq) then -%> - <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%> - <div class="method-heading"> - <span class="method-callseq"> - <%= h(call_seq.strip. - gsub( /^\w+\./m, '')). - gsub(/(.*)[-=]>/, '\1→') %> - </span> - <%- if i == 0 and method.token_stream then -%> - <span class="method-click-advice">click to toggle source</span> + <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%> + <div class="method-heading"> + <span class="method-callseq"> + <%= h(call_seq.strip. + gsub( /^\w+\./m, '')). + gsub(/(.*)[-=]>/, '\1→') %> + </span> + </div> <%- end -%> - </div> - <%- end -%> <%- elsif method.has_call_seq? then -%> - <div class="method-heading"> - <span class="method-name"><%= h method.name %></span> - </div> + <div class="method-heading"> + <span class="method-name"><%= h method.name %></span> + </div> <%- else -%> - <div class="method-heading"> - <span class="method-name"><%= h method.name %></span><span - class="method-args"><%= h method.param_seq %></span> - <%- if method.token_stream then -%> - <span class="method-click-advice">click to toggle source</span> - <%- end -%> - </div> + <div class="method-heading"> + <span class="method-name"><%= h method.name %></span> + <span class="method-args"><%= h method.param_seq %></span> + </div> <%- end -%> </div> + <%- if method.token_stream -%> + <div class="method-controls"> + <details class="method-source-toggle"> + <summary>Source</summary> + </details> + </div> + <%- end -%> + <%- unless method.skip_description? then -%> <div class="method-description"> + <%- if method.token_stream then -%> + <div class="method-source-code" id="<%= method.html_name %>-source"> + <pre><%= method.markup_code %></pre> + </div> + <%- end -%> <%- if method.comment then -%> <%= method.description.strip %> <%- else -%> @@ -144,12 +151,6 @@ %> </div> <%- end -%> - - <%- if method.token_stream then -%> - <div class="method-source-code" id="<%= method.html_name %>-source"> - <pre><%= method.markup_code %></pre> - </div> - <%- end -%> </div> <%- end -%> |