Class: GitWrapper::Commands::Diff
- Inherits:
-
Git
- Object
- Git
- GitWrapper::Commands::Diff
show all
- Defined in:
- lib/git_wrapper/commands/diff.rb
Instance Attribute Summary
Attributes inherited from Git
#error, #location_folder, #output
Instance Method Summary
collapse
Methods inherited from Git
#execute, #initialize, #success?
Instance Method Details
#command ⇒ Object
15
16
17
|
# File 'lib/git_wrapper/commands/diff.rb', line 15
def command
"diff #{@commit}#{@reverse ? ' -R ' : ''} --name-status"
end
|
#result ⇒ Object
19
20
21
22
23
|
# File 'lib/git_wrapper/commands/diff.rb', line 19
def result
output.split(/\n/).map do |line|
Results::DiffNameStatus.parse(line)
end
end
|
#reverse ⇒ Object
10
11
12
13
|
# File 'lib/git_wrapper/commands/diff.rb', line 10
def reverse
@reverse = true
self
end
|
#with(commit) ⇒ Object
5
6
7
8
|
# File 'lib/git_wrapper/commands/diff.rb', line 5
def with(commit)
@commit = commit
self
end
|