Class: OptimisWorkflow::Commands::StartFeature

Inherits:
StartCommand show all
Defined in:
lib/optimis-workflow/commands/start_feature.rb

Instance Attribute Summary

Attributes inherited from Base

#args

Instance Method Summary collapse

Methods inherited from StartCommand

#remote_stuff, #story_id

Methods inherited from Base

#execute!

Methods included from OptimisWorkflow::Common

#current_dir, #mark_as_started_on_pivotal, #payload, #settings, #settings_file, #start_feature

Constructor Details

#initialize(args) ⇒ StartFeature

Returns a new instance of StartFeature.



5
6
7
8
# File 'lib/optimis-workflow/commands/start_feature.rb', line 5

def initialize(args)
  super(args)
  fail "Please pass in a story id" if args.empty?
end

Instance Method Details

#help_msgObject



14
15
16
# File 'lib/optimis-workflow/commands/start_feature.rb', line 14

def help_msg
  "Syntax: start-feature STORYID"
end

#local_stuffObject



10
11
12
# File 'lib/optimis-workflow/commands/start_feature.rb', line 10

def local_stuff
  system "git checkout -b feature-#{story_id}"
end