Class: DevFlow::Commands::Branch

Inherits:
DevFlow::Command show all
Defined in:
lib/devflow/commands/branch.rb

Instance Method Summary collapse

Methods inherited from DevFlow::Command

#initialize

Constructor Details

This class inherits a constructor from DevFlow::Command

Instance Method Details

#callObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/devflow/commands/branch.rb', line 6

def call
  unless assignment
    puts "No such task"
    exit 1
  end

  branch = "#{assignment[:id]}-#{DevFlow.branchify(assignment[:name])}"

  `git checkout -b #{branch}`
end