Method: Stax::Cli#create
- Defined in:
- lib/stax/cli/crud.rb
#create ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/stax/cli/crud.rb', line 19 def create stacks = stack_objects ## filter by stack groups unless [:all] stacks.reject! do |s| (s.stack_groups.map(&:to_s) & [:groups]).empty? # test intersection end end stacks.each do |s| if s.exists? say("Skipping: #{s.stack_name} exists", :yellow) elsif y_or_n?("Create #{s.stack_name}?", :yellow) s.create end end end |