Class: GitDiffLCS::LibGit
- Inherits:
-
Object
- Object
- GitDiffLCS::LibGit
- Defined in:
- lib/git_diff_lcs/lib_git.rb
Overview
Git
Instance Attribute Summary collapse
-
#git ⇒ Object
readonly
Returns the value of attribute git.
Instance Method Summary collapse
- #diff ⇒ Object
-
#initialize(git_target, dir, src, dest) ⇒ LibGit
constructor
initialize GitDiffLCS::LibGit.
Constructor Details
#initialize(git_target, dir, src, dest) ⇒ LibGit
initialize GitDiffLCS::LibGit
Arguments:
[String] git_target: git repository address or working directory
[String] dir: temporary folder
[String] src: commit or branch
[String] dest: commit or branch
17 18 19 20 21 22 |
# File 'lib/git_diff_lcs/lib_git.rb', line 17 def initialize(git_target, dir, src, dest) @dir = dir @src = src @dest = dest get_git(git_target) end |
Instance Attribute Details
#git ⇒ Object (readonly)
Returns the value of attribute git.
8 9 10 |
# File 'lib/git_diff_lcs/lib_git.rb', line 8 def git @git end |
Instance Method Details
#diff ⇒ Object
24 25 26 |
# File 'lib/git_diff_lcs/lib_git.rb', line 24 def diff @diff ||= @git.diff(@src, @dest) end |