Class: GitWrapper::Commands::Reset
- Inherits:
-
Git
- Object
- Git
- GitWrapper::Commands::Reset
show all
- Defined in:
- lib/git_wrapper/commands/reset.rb
Instance Attribute Summary
Attributes inherited from Git
#error, #location_folder, #output
Instance Method Summary
collapse
Methods inherited from Git
#execute, #initialize, #result, #success?
Instance Method Details
#command ⇒ Object
30
31
32
|
# File 'lib/git_wrapper/commands/reset.rb', line 30
def command
"reset #{@mode ? "--#{@mode}" : ''} #{@commit}"
end
|
#commit(commit) ⇒ Object
5
6
7
8
|
# File 'lib/git_wrapper/commands/reset.rb', line 5
def commit(commit)
@commit = commit
self
end
|
#hard ⇒ Object
15
16
17
18
|
# File 'lib/git_wrapper/commands/reset.rb', line 15
def hard
@mode = :hard
self
end
|
#keep ⇒ Object
25
26
27
28
|
# File 'lib/git_wrapper/commands/reset.rb', line 25
def keep
@mode = :keep
self
end
|
#merge ⇒ Object
20
21
22
23
|
# File 'lib/git_wrapper/commands/reset.rb', line 20
def merge
@mode = :merge
self
end
|
#soft ⇒ Object
10
11
12
13
|
# File 'lib/git_wrapper/commands/reset.rb', line 10
def soft
@mode = :soft
self
end
|