Permalink
Browse files

Added command details

  • Loading branch information...
1 parent d3fbca2 commit 33ca45d14db8ada3799e618a4c55443f60ea22e8 @koraktor committed Nov 24, 2010
@@ -0,0 +1,9 @@
+<% unless commands.empty? %>
+ <div id="command_details" class="command_details">
+ <h2>Command Details</h2>
+
+ <% commands.each_with_index do |cmd, i| %>
+ <%= yieldall :object => cmd, :index => i %>
+ <% end %>
+ </div>
+<% end %>
@@ -7,6 +7,7 @@ def init
super
sections.place(:rubikon).after(T('docstring'))
sections.place(:command_summary).after(:attribute_summary)
+ sections.place(:command_details, [T('command_details')]).after(:method_details_list)
end
def commands
@@ -0,0 +1,9 @@
+<p class="signature <%= 'first' if @index == 0 %>" id="<%= anchor_for(object) %>">
+ <%= "&gt;&gt; <strong>#{h object.name}</strong>" %>
+ <% if object.aliases.size > 0 %>
+ <span class="aliases">Also known as:
+ <span class="names"><%= object.aliases.map {|o|
+ "<span id='#{anchor_for(o)}'>" + h(o.name.to_s) + "</span>" }.join(", ") %></span>
+ </span>
+ <% end %>
+</p>
@@ -0,0 +1,3 @@
+<div class="command_details <%= @index == 0 ? 'first' : '' %>">
+ <%= yieldall %>
+</div>
@@ -0,0 +1,8 @@
+# This code is free software; you can redistribute it and/or modify it under
+# the terms of the new BSD License.
+#
+# Copyright (c) 2010, Sebastian Staudt
+
+def init
+ sections :header, [:command_signature, T('docstring')]
+end

0 comments on commit 33ca45d

Please sign in to comment.