Sha256: 038bb0af9a5433c1d9500954f83455305b8f6cc7851082e28d2a3103823939ed

Contents?: true

Size: 482 Bytes

Versions: 2

Compression:

Stored size: 482 Bytes

Contents

require_relative './highline_cli.rb'
require_relative './local_code.rb'

module GitHelper
  class NewBranch
    def execute(new_branch_name = nil)
      branch_name = new_branch_name || cli.new_branch_name
      puts "Attempting to create a new branch: #{branch_name}"
      local_code.new_branch(branch_name)
    end

    private def cli
      @cli ||= GitHelper::HighlineCli.new
    end

    private def local_code
      @local_code ||= GitHelper::LocalCode.new
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
git_helper-1.3.1 lib/git_helper/new_branch.rb
git_helper-1.3.0 lib/git_helper/new_branch.rb