class CheckoutTo::CLI

Public Class Methods

start(args) click to toggle source
# File lib/checkout_to.rb, line 7
def self.start(args)
  raise Error, 'Give a name of the brach to checkout' unless args.any?
  
  name = args.compact.map(&:downcase).join('_')
  branch = "#{Time.now.to_i}_#{name}"
  
  `git checkout -b #{branch}`
end