Class: GitClient

Inherits:
Object
  • Object
show all
Defined in:
lib/git_heat/git_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(dir) ⇒ GitClient

Returns a new instance of GitClient.



2
3
4
# File 'lib/git_heat/git_client.rb', line 2

def initialize(dir)
  @dir = dir
end

Instance Method Details

#stat_historyObject



5
6
7
8
9
10
11
# File 'lib/git_heat/git_client.rb', line 5

def stat_history
  ret = nil
  Dir.chdir(@dir) do
    ret = `git log --numstat --pretty=format:"commit: %H %cd" --reverse`
  end
  ret
end