Skip to content

Instantly share code, notes, and snippets.

@kubo
Created December 23, 2010 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kubo/752409 to your computer and use it in GitHub Desktop.
Save kubo/752409 to your computer and use it in GitHub Desktop.
--- lib/rdoc/generator/template/darkfish/classpage.rhtml (revision 716)
+++ lib/rdoc/generator/template/darkfish/classpage.rhtml (working copy)
@@ -225,16 +225,22 @@
<div id="<%= method.html_name %>-method" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
<a name="<%= h method.aref %>"></a>
+ <% if method.call_seq %>
+ <% method.call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
<div class="method-heading">
- <% if method.call_seq %>
- <span class="method-callseq"><%= method.call_seq.strip.gsub(/->/, '&rarr;').gsub( /^\w.+\./m, '') %></span>
+ <span class="method-callseq"><%= call_seq.strip.gsub(/->/, '&rarr;').gsub( /^\w.+\./m, '') %></span>
+ <% if i == 0 %>
<span class="method-click-advice">click to toggle source</span>
+ <% end %>
+ </div>
+ <% end %>
<% else %>
+ <div class="method-heading">
<span class="method-name"><%= h method.name %></span><span
class="method-args"><%= method.params %></span>
<span class="method-click-advice">click to toggle source</span>
+ </div>
<% end %>
- </div>
<div class="method-description">
<% if method.comment %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment