Class: GitWrapper::Commands::DiffTree
- Defined in:
- lib/git_wrapper/commands/diff_tree.rb
Instance Attribute Summary
Attributes inherited from Git
#error, #location_folder, #output
Instance Method Summary collapse
Methods inherited from Git
#execute, #initialize, #success?
Constructor Details
This class inherits a constructor from GitWrapper::Commands::Git
Instance Method Details
#command ⇒ Object
10 11 12 |
# File 'lib/git_wrapper/commands/diff_tree.rb', line 10 def command "diff-tree #{@commit} -r --name-status" end |
#commit(commit) ⇒ Object
5 6 7 8 |
# File 'lib/git_wrapper/commands/diff_tree.rb', line 5 def commit(commit) @commit = commit self end |
#result ⇒ Object
14 15 16 17 18 19 |
# File 'lib/git_wrapper/commands/diff_tree.rb', line 14 def result files = output.split(/\n/)[1..-1] || [] files.map do |line| Results::DiffNameStatus.parse(line) end end |