Added custom @see YARD template

This commit is contained in:
Kyle Banker 2010-01-28 18:45:57 -05:00
parent e075d25a91
commit f6b65ba547
2 changed files with 13 additions and 1 deletions

View File

@ -99,7 +99,7 @@ task :ydoc do
require File.join(File.dirname(__FILE__), 'lib', 'mongo') require File.join(File.dirname(__FILE__), 'lib', 'mongo')
out = File.join('ydoc', Mongo::VERSION) out = File.join('ydoc', Mongo::VERSION)
FileUtils.rm_rf('ydoc') FileUtils.rm_rf('ydoc')
system "yardoc lib/**/*.rb lib/mongo/**/*.rb -o #{out} --title MongoRuby-#{Mongo::VERSION}" system "yardoc lib/**/*.rb lib/mongo/**/*.rb -p templates -o #{out} --title MongoRuby-#{Mongo::VERSION}"
end end
desc "Publish documentation to mongo.rubyforge.org" desc "Publish documentation to mongo.rubyforge.org"

View File

@ -0,0 +1,12 @@
<% if object.has_tag?(:see) %>
<h3>See Also:</h3>
<ul class="see">
<% for tag in object.tags(:see) %>
<% if tag.name =~ /^http/ %>
<li><%= linkify(tag.name, tag.text || tag.name) %></li>
<% else %>
<li><%= tag.text %></li>
<% end %>
<% end %>
</ul>
<% end %>