Class: GitWorkflow::Commands::Base

Inherits:
Object
  • Object
show all
Includes:
Execution, GitWorkflow::CommandLine, Git, Logging
Defined in:
lib/git_workflow/commands/base.rb

Direct Known Subclasses

Finish, Setup, Start

Constant Summary

Constants included from GitWorkflow::CommandLine

GitWorkflow::CommandLine::InvalidCommandLine

Instance Method Summary collapse

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, &block) ⇒ Base

Returns a new instance of Base.



17
18
19
20
21
22
23
24
# File 'lib/git_workflow/commands/base.rb', line 17

def initialize(command_line_arguments, &block)
  parse_command_line(command_line_arguments, &block)
  
  # Such a hack!  This effectively the callbacks to only be loaded after the
  # command line arguments have been processed, injecting them into an already
  # instantiated command.  Really should refactor that!
  require 'git_workflow/callbacks'
end

Instance Method Details

#command_specific_options(options) ⇒ Object



26
27
28
# File 'lib/git_workflow/commands/base.rb', line 26

def command_specific_options(options)
  options.separator '    This command has no specific options'
end