Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #36 from suaron/master

Added permalinks for methods.
  • Loading branch information...
commit 4651bf075578dbddbeb112dc81aee406aea94ad0 2 parents ff80cbe + 625ff19
@voloko authored
View
7 lib/rdoc/generator/template/rails/_context.rhtml
@@ -150,10 +150,11 @@
<div class="method">
<div class="title method-title" id="<%= method.aref %>">
<% if method.call_seq %>
- <a name="<%= method.aref %>"></a><b><%= method.call_seq.gsub(/->/, '&rarr;') %></b>
+ <b><%= method.call_seq.gsub(/->/, '&rarr;') %></b>
<% else %>
- <a name="<%= method.aref %>"></a><b><%= h method.name %></b><%= h method.params %>
+ <b><%= h method.name %></b><%= h method.params %>
<% end %>
+ <a href="<%= "#{rel_prefix}/#{context.path}##{method.aref}"%>" name="<%= method.aref %>" class="permalink">Link</a>
</div>
<% if method.comment %>
@@ -206,4 +207,4 @@
<% end #visibilities.each %>
<% end #context.methods_by_type %>
<% end #context.each_section %>
-</div>
+</div>
View
7 lib/rdoc/generator/template/rails/resources/css/main.css
@@ -280,6 +280,13 @@ tt {
margin: 0 0 0.5em 0;
font-size: 1.2em;
line-height: 1.25em;
+ position: relative;
+}
+
+.method .method-title a.permalink {
+ position: absolute;
+ font-size: 0.75em;
+ right: 0;
}
.method .sourcecode p.source-link {
View
7 lib/rdoc/generator/template/sdoc/_context.rhtml
@@ -150,10 +150,11 @@
<div class="method">
<div class="title method-title" id="<%= method.aref %>">
<% if method.call_seq %>
- <a name="<%= method.aref %>"></a><b><%= method.call_seq.gsub(/->/, '&rarr;') %></b>
+ <b><%= method.call_seq.gsub(/->/, '&rarr;') %></b>
<% else %>
- <a name="<%= method.aref %>"></a><b><%= h method.name %></b><%= h method.params %>
+ <b><%= h method.name %></b><%= h method.params %>
<% end %>
+ <a href="<%= "#{rel_prefix}/#{context.path}##{method.aref}"%>" name="<%= method.aref %>" class="permalink">Link</a>
</div>
<% if method.comment %>
@@ -206,4 +207,4 @@
<% end #visibilities.each %>
<% end #context.methods_by_type %>
<% end #context.each_section %>
-</div>
+</div>
View
7 lib/rdoc/generator/template/sdoc/resources/css/main.css
@@ -267,6 +267,13 @@ tt {
margin: 0 0 0.5em 0;
font-size: 1.2em;
line-height: 1.25em;
+ position: relative;
+}
+
+.method .method-title a.permalink {
+ position: absolute;
+ font-size: 0.75em;
+ right: 0;
}
.method .sourcecode p.source-link {
Please sign in to comment.
Something went wrong with that request. Please try again.