Class: GitWrapper::Commands::Revert
- Defined in:
- lib/git_wrapper/commands/revert.rb
Instance Attribute Summary
Attributes inherited from Git
#error, #location_folder, #output
Instance Method Summary collapse
Methods inherited from Git
#execute, #initialize, #result, #success?
Constructor Details
This class inherits a constructor from GitWrapper::Commands::Git
Instance Method Details
#command ⇒ Object
17 18 19 |
# File 'lib/git_wrapper/commands/revert.rb', line 17 def command "revert#{@merge ? ' -m 1' : ''} --no-edit #{@commit}" end |
#commit(commit) ⇒ Object
5 6 7 8 9 |
# File 'lib/git_wrapper/commands/revert.rb', line 5 def commit(commit) @commit = commit @merge = false self end |
#merge(commit) ⇒ Object
11 12 13 14 15 |
# File 'lib/git_wrapper/commands/revert.rb', line 11 def merge(commit) @commit = commit @merge = true self end |