Class: Gollum::BlobEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/smeagol/gollum/blob_entry.rb

Instance Method Summary collapse

Instance Method Details

#file(wiki, commit) ⇒ Object

Gets a File instance for this blob.

Parameters:

  • wiki

    Gollum::Wiki instance for the Gollum::Page

Returns:

  • a Gollum::File instance.



9
10
11
12
13
14
# File 'lib/smeagol/gollum/blob_entry.rb', line 9

def file(wiki, commit)
  blob = self.blob(wiki.repo)
  file = wiki.file_class.new(wiki).populate(blob, self.dir)
  file.version = commit
  file
end