Class: GitWrapper::Commands::Show
- Inherits:
-
Git
- Object
- Git
- GitWrapper::Commands::Show
show all
- Defined in:
- lib/git_wrapper/commands/show.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
#base ⇒ Object
15
16
17
18
|
# File 'lib/git_wrapper/commands/show.rb', line 15
def base
@version = ':1:'
self
end
|
#command ⇒ Object
30
31
32
|
# File 'lib/git_wrapper/commands/show.rb', line 30
def command
"show #{@version ? @version : 'HEAD:'}\"#{@file}\""
end
|
#commit(commit) ⇒ Object
10
11
12
13
|
# File 'lib/git_wrapper/commands/show.rb', line 10
def commit(commit)
@version = "#{commit}:"
self
end
|
#file(file_name) ⇒ Object
5
6
7
8
|
# File 'lib/git_wrapper/commands/show.rb', line 5
def file(file_name)
@file = to_relative_path(file_name)
self
end
|
#mine ⇒ Object
20
21
22
23
|
# File 'lib/git_wrapper/commands/show.rb', line 20
def mine
@version = ':2:'
self
end
|
#result ⇒ Object
34
35
36
|
# File 'lib/git_wrapper/commands/show.rb', line 34
def result
output
end
|
#theirs ⇒ Object
25
26
27
28
|
# File 'lib/git_wrapper/commands/show.rb', line 25
def theirs
@version = ':3:'
self
end
|