Skip to content

Commit b118bc9

Browse files
authored
Merge pull request #942 from nevans/darkfish-combine-call-seq-div
Darkfish: group method call-seq in div.method-header
2 parents d6c6c0d + 5db4bce commit b118bc9

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

lib/rdoc/generator/template/darkfish/class.rhtml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -98,28 +98,30 @@
9898

9999
<%- methods.each do |method| -%>
100100
<div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
101-
<%- if (call_seq = method.call_seq) then -%>
102-
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
103-
<div class="method-heading">
104-
<span class="method-callseq">
105-
<%= h(call_seq.strip.
106-
gsub( /^\w+\./m, '')).
107-
gsub(/(.*)[-=]&gt;/, '\1&rarr;') %>
108-
</span>
109-
<%- if i == 0 and method.token_stream then -%>
110-
<span class="method-click-advice">click to toggle source</span>
111-
<%- end -%>
112-
</div>
113-
<%- end -%>
114-
<%- else -%>
115-
<div class="method-heading">
116-
<span class="method-name"><%= h method.name %></span><span
117-
class="method-args"><%= h method.param_seq %></span>
118-
<%- if method.token_stream then -%>
119-
<span class="method-click-advice">click to toggle source</span>
101+
<div class="method-header">
102+
<%- if (call_seq = method.call_seq) then -%>
103+
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
104+
<div class="method-heading">
105+
<span class="method-callseq">
106+
<%= h(call_seq.strip.
107+
gsub( /^\w+\./m, '')).
108+
gsub(/(.*)[-=]&gt;/, '\1&rarr;') %>
109+
</span>
110+
<%- if i == 0 and method.token_stream then -%>
111+
<span class="method-click-advice">click to toggle source</span>
112+
<%- end -%>
113+
</div>
114+
<%- end -%>
115+
<%- else -%>
116+
<div class="method-heading">
117+
<span class="method-name"><%= h method.name %></span><span
118+
class="method-args"><%= h method.param_seq %></span>
119+
<%- if method.token_stream then -%>
120+
<span class="method-click-advice">click to toggle source</span>
121+
<%- end -%>
122+
</div>
120123
<%- end -%>
121124
</div>
122-
<%- end -%>
123125

124126
<div class="method-description">
125127
<%- if method.comment then -%>

0 commit comments

Comments
 (0)