Class: Command::Branch

Inherits:
Base
  • Object
show all
Defined in:
lib/lighthouse_branch/commands/branch.rb

Class Method Summary collapse

Methods inherited from Base

command_name, command_regexes, commands, default_command, invoke, number_of_arguments, run, usage

Class Method Details

.command_string(branch_name, ticket_id, args) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/lighthouse_branch/commands/branch.rb', line 8

def self.command_string(branch_name, ticket_id, args)
  command_string = "git checkout -b #{branch_name}"
  if remote_name = args.shift
    command_string += "; #{Command::Push.command_string(branch_name, ticket_id, remote_name.to_a)}"
  end
  return command_string
end