added core tag for ydoc
This commit is contained in:
parent
f6b65ba547
commit
a8a5b585c9
2
Rakefile
2
Rakefile
|
@ -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"
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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 %>
|
|
@ -0,0 +1,4 @@
|
|||
def init
|
||||
super
|
||||
sections[1].push :core
|
||||
end
|
Loading…
Reference in New Issue