Class: GitCommands::Commit
- Defined in:
- lib/straight_line/common/git_commands/commit.rb
Overview
Commit
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
-
#initialize(title, body = '') ⇒ Commit
constructor
A new instance of Commit.
Methods inherited from Command
#arg, from_file, #run, #run_sub_commands, #sub_command
Constructor Details
#initialize(title, body = '') ⇒ Commit
Returns a new instance of Commit.
6 7 8 9 10 11 |
# File 'lib/straight_line/common/git_commands/commit.rb', line 6 def initialize(title, body = '') super 'git' arg 'commit -a' arg %(-m "#{title}") unless title.empty? arg %(-m "#{body}") unless body.nil? || body.empty? end |