Class: CheckoutTo::CLI
- Inherits:
-
Object
- Object
- CheckoutTo::CLI
- Defined in:
- lib/checkout_to.rb
Class Method Summary collapse
Class Method Details
.start(args) ⇒ Object
7 8 9 10 11 12 13 14 |
# 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 |