class Git::File

Attributes

name[R]
sha[R]

Public Class Methods

new(line) click to toggle source
# File lib/git_hook-pre_receive/file.rb, line 6
def initialize(line)
  @sha, @name = line.split(' ').values_at(3, 5)
  @sha = @sha.gsub(/\./, '')
end

Public Instance Methods

content() click to toggle source
# File lib/git_hook-pre_receive/file.rb, line 11
def content
  runner = Runner.new("git show #{sha}")
  runner.result.join "\n"
end