Class: StackMaster::Commands::Delete
- Inherits:
-
Object
- Object
- StackMaster::Commands::Delete
- Includes:
- StackMaster::Command, Prompter
- Defined in:
- lib/stack_master/commands/delete.rb
Instance Method Summary collapse
-
#initialize(region, stack_name, options) ⇒ Delete
constructor
A new instance of Delete.
- #perform ⇒ Object
Methods included from Prompter
Methods included from StackMaster::Command
Constructor Details
#initialize(region, stack_name, options) ⇒ Delete
Returns a new instance of Delete.
7 8 9 10 11 12 |
# File 'lib/stack_master/commands/delete.rb', line 7 def initialize(region, stack_name, ) super(nil, nil, ) @region = region @stack_name = stack_name @from_time = Time.now end |
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/stack_master/commands/delete.rb', line 14 def perform return unless check_exists unless ask?("Really delete stack #{@stack_name} (y/n)? ") StackMaster.stdout.puts "Stack update aborted" return end delete_stack tail_stack_events unless StackMaster.quiet? end |