Class: Grit::Blob

Inherits:
Object
  • Object
show all
Defined in:
lib/grit_adapter/git_layer_grit.rb

Instance Method Summary collapse

Instance Method Details



367
368
369
# File 'lib/grit_adapter/git_layer_grit.rb', line 367

def is_symlink
  self.mode == 0120000
end


371
372
373
374
375
376
377
378
# File 'lib/grit_adapter/git_layer_grit.rb', line 371

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