fix documentation for Wiki.size

This commit is contained in:
Paul Baumgart
2010-09-02 20:30:13 -07:00
parent 7c70174725
commit 50e9a42503
+2 -2
View File
@@ -224,11 +224,11 @@ module Gollum
tree_list(treeish || 'master')
end
# Fill an array with a list of pages.
# Public: Returns the number of pages accessible from a commit
#
# ref - A String ref that is either a commit SHA or references one.
#
# Returns a flat Array of Gollum::Page instances.
# Returns a Fixnum
def size(ref = nil)
tree_map_for(ref || 'master').inject(0) do |num, entry|
num + (@page_class.valid_page_name?(entry.name) ? 1 : 0)