Add Wiki#files for list of non-page files.
This commit is contained in:
+15
-2
@@ -19,6 +19,7 @@ module Gollum
|
||||
def name
|
||||
@blob && @blob.name
|
||||
end
|
||||
alias filename name
|
||||
|
||||
# Public: The raw contents of the page.
|
||||
#
|
||||
@@ -28,7 +29,7 @@ module Gollum
|
||||
end
|
||||
|
||||
# Public: The Grit::Commit version of the file.
|
||||
attr_reader :version
|
||||
attr_accessor :version
|
||||
|
||||
# Public: The String path of the file.
|
||||
attr_reader :path
|
||||
@@ -38,6 +39,18 @@ module Gollum
|
||||
@blob.mime_type
|
||||
end
|
||||
|
||||
# Populate the Page with information from the Blob.
|
||||
#
|
||||
# blob - The Grit::Blob that contains the info.
|
||||
# path - The String directory path of the page file.
|
||||
#
|
||||
# Returns the populated Gollum::Page.
|
||||
def populate(blob, path=nil)
|
||||
@blob = blob
|
||||
@path = "#{path}/#{blob.name}"[1..-1]
|
||||
self
|
||||
end
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Internal Methods
|
||||
@@ -61,4 +74,4 @@ module Gollum
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user