Class: Grit::Blob

Inherits:
Object
  • Object
show all
Defined in:
lib/gollum-lib/grit_ext.rb

Instance Method Summary collapse

Instance Method Details



5
6
7
# File 'lib/gollum-lib/grit_ext.rb', line 5

def is_symlink
  self.mode == 0120000
end


9
10
11
12
13
14
15
16
# File 'lib/gollum-lib/grit_ext.rb', line 9

def symlink_target(base_path = nil)
  target = self.data
  new_path = File.expand_path(File.join('..', target), base_path)

  if File.file? new_path
    return new_path
  end
end