Add Wiki#files for list of non-page files.

This commit is contained in:
trans
2012-06-22 08:23:46 -04:00
parent 8fd11e8fdb
commit 754485c306
4 changed files with 62 additions and 3 deletions
+13 -1
View File
@@ -48,6 +48,18 @@ module Gollum
page
end
# Gets a File instance for this blob.
#
# wiki - Gollum::Wiki instance for the Gollum::File
#
# Returns a Gollum::File instance.
def file(wiki, commit)
blob = self.blob(wiki.repo)
file = wiki.file_class.new(wiki).populate(blob, self.dir)
file.version = commit
file
end
def inspect
%(#<Gollum::BlobEntry #{@sha} #{@path}>)
end
@@ -75,4 +87,4 @@ module Gollum
dir
end
end
end
end