Sha256: 688e493d23d735ba834582d858f41ace881467a25bf904a9c814eaceabc74f40
Contents?: true
Size: 486 Bytes
Versions: 3
Compression:
Stored size: 486 Bytes
Contents
require 'straight_line/common/user_error' require 'straight_line/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 =~ /\s/ @feature_name = feature_name end def run cmd = Command.new 'git', ['checkout', '-b', @feature_name] cmd.run end end end
Version data entries
3 entries across 3 versions & 1 rubygems