Class: GitWorkflow::Commands::Finish
- Defined in:
- lib/git_workflow/commands/finish.rb
Constant Summary
Constants included from GitWorkflow::CommandLine
GitWorkflow::CommandLine::InvalidCommandLine
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(command_line_arguments) ⇒ Finish
constructor
A new instance of Finish.
Methods inherited from Base
Methods included from Git
#checkout_or_create_branch, #get_config_value_for, #get_config_value_for!, #in_git_branch, #merge_branch, #repository, #set_config_value
Methods included from Logging
default_logger, included, logger, logger=
Methods included from Execution
#execute_command, #execute_command_with_output_handling
Constructor Details
#initialize(command_line_arguments) ⇒ Finish
Returns a new instance of Finish.
7 8 9 10 11 12 |
# File 'lib/git_workflow/commands/finish.rb', line 7 def initialize(command_line_arguments) super(command_line_arguments) do |remaining_arguments| @story_id, @target_branch = remaining_arguments @target_branch ||= 'master' end end |
Instance Method Details
#execute ⇒ Object
14 15 16 17 18 19 |
# File 'lib/git_workflow/commands/finish.rb', line 14 def execute story_or_current_branch(@story_id) do |story| finish(story, @target_branch) finish_story_on_pivotal_tracker!(story) end end |