Class: GitWrapper::Commands::Checkout
- Defined in:
- lib/git_wrapper/commands/checkout.rb
Instance Attribute Summary
Attributes inherited from Git
#error, #location_folder, #output
Instance Method Summary collapse
Methods inherited from Git
#execute, #initialize, #result, #to_relative_path
Constructor Details
This class inherits a constructor from GitWrapper::Commands::Git
Instance Method Details
#command ⇒ Object
15 16 17 |
# File 'lib/git_wrapper/commands/checkout.rb', line 15 def command "checkout #{@commit} #{@new_branch.nil? ? '' : "-b #{@new_branch}" }" end |
#commit(commit) ⇒ Object
5 6 7 8 |
# File 'lib/git_wrapper/commands/checkout.rb', line 5 def commit(commit) @commit = commit self end |
#into(new_branch) ⇒ Object
10 11 12 13 |
# File 'lib/git_wrapper/commands/checkout.rb', line 10 def into(new_branch) @new_branch = new_branch self end |