Class: GitWrapper::Commands::Commit
- Defined in:
- lib/git_wrapper/commands/commit.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
#author(name, email) ⇒ Object
10 11 12 13 |
# File 'lib/git_wrapper/commands/commit.rb', line 10 def (name, email) @author = "#{name} <#{email}>" self end |
#command ⇒ Object
15 16 17 |
# File 'lib/git_wrapper/commands/commit.rb', line 15 def command "commit -m \"#{@message}\" #{@author ? "--author \"#{@author}\"" : ''}" end |
#message(message) ⇒ Object
5 6 7 8 |
# File 'lib/git_wrapper/commands/commit.rb', line 5 def () @message = self end |