Sha256: 6fe23f25873a8c00ff9e3904dc507efc92b0e6bf7f805e32896fb599519087fc
Contents?: true
Size: 463 Bytes
Versions: 1
Compression:
Stored size: 463 Bytes
Contents
require 'common/user_error' require 'common/command' module Feature # Creates a new branch for the feature class Create def initialize(feature_name) raise UserError, 'Feature name required' unless feature_name raise UserError, "Feature name can't have spaces" if feature_name.match %r[\s] @feature_name = feature_name end def run cmd = Command.new 'git', ['checkout', '-b', @feature_name] cmd.run end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
straight_line-0.1.0.0 | lib/common/feature/create.rb |