class Gollum::File

Attributes

version[RW]

Public: The current version of the page.

Returns the Grit::Commit.

wiki[R]

Public Instance Methods

extname() click to toggle source
# File lib/smeagol/gollum/file.rb, line 39
def extname
  ::File.extname(path)
end
populate(blob, path=nil) click to toggle source

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.

# File lib/smeagol/gollum/file.rb, line 12
def populate(blob, path=nil)
  @blob = blob
  @path = "#{path}/#{blob.name}"[1..-1]
  self
end
title() click to toggle source

Public: The title will be constructed from the filename by stripping the extension and replacing any dashes with spaces.

Returns the fully sanitized String title.

# File lib/smeagol/gollum/file.rb, line 34
def title
  Sanitize.clean(name).strip
end