Refactor app.rb to use paged.

Create new pages relative to current directory.
This commit is contained in:
bootstraponline
2012-08-01 00:14:26 -06:00
parent 2261cfabf3
commit 72e26fc90b
6 changed files with 68 additions and 52 deletions
+11
View File
@@ -201,6 +201,17 @@ module Gollum
@page_class.new(self).find(name, version, dir)
end
# Public: Convenience method instead of calling page(name, nil, dir).
#
# name - The human or canonical String page name of the wiki page.
# version - The String version ID to find (default: @ref).
# dir - The directory String relative to the repo.
#
# Returns a Gollum::Page or nil if no matching page was found.
def paged(name, dir = nil, version = @ref)
page(name, version, dir)
end
# Public: Get the static file for a given name.
#
# name - The full String pathname to the file.