added core tag for ydoc

This commit is contained in:
Kyle Banker 2010-02-01 20:22:08 -05:00
parent f6b65ba547
commit a8a5b585c9
4 changed files with 14 additions and 2 deletions

View File

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

View File

@ -127,7 +127,7 @@ module Mongo
# @raise [RuntimeError]
# if given unknown options
#
# @see Official, <a href="http://dochub.mongodb.org/find" name="find-instance_method" rel="find">Official Docs</a>
# @core find
def find(selector={}, opts={})
fields = opts.delete(:fields)
fields = ["_id"] if fields && fields.empty?

View File

@ -0,0 +1,8 @@
<% if object.has_tag?(:core) %>
<h3>Core docs:</h3>
<ul class="see">
<% for tag in object.tags(:core) %>
<li><%= linkify('http://dochub.mongodb.org/core/' + tag.name, tag.text || tag.name.capitalize) %></li>
<% end %>
</ul>
<% end %>

View File

@ -0,0 +1,4 @@
def init
super
sections[1].push :core
end