Class: DockerRailsProxy::Stack::Destroy
- Inherits:
-
DockerRailsProxy::Stack
- Object
- Base
- AwsCli
- DockerRailsProxy::Stack
- DockerRailsProxy::Stack::Destroy
- Defined in:
- lib/docker_rails_proxy/commands/stack/destroy.rb
Constant Summary
Constants inherited from DockerRailsProxy::Stack
Constants included from Callbacks
Callbacks::INHERITABLE_CALLBACKS, Callbacks::UNINHERITABLE_CALLBACKS
Instance Attribute Summary collapse
-
#stacks ⇒ Object
Returns the value of attribute stacks.
Attributes inherited from DockerRailsProxy::Stack
Attributes inherited from Base
#additional_arguments, #additional_arguments_options, #arguments
Instance Method Summary collapse
Methods inherited from Base
build_path, call, command, execute, #initialize
Methods included from Logger
Methods included from Rsync
Methods included from Callbacks
Methods included from InheritableAttributes
Constructor Details
This class inherits a constructor from DockerRailsProxy::Base
Instance Attribute Details
#stacks ⇒ Object
Returns the value of attribute stacks.
4 5 6 |
# File 'lib/docker_rails_proxy/commands/stack/destroy.rb', line 4 def stacks @stacks end |
Instance Method Details
#process ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/docker_rails_proxy/commands/stack/destroy.rb', line 29 def process begin (stacks, 'Choose the stack number and press [ENTER]') stack_name = get_option(stacks) end while stack_name.blank? puts "You're about to destroy this stack: #{stack_name}, are you sure? [yes]:" exit unless $stdin.gets.chomp == 'yes' puts "Destroying #{stack_name} stack" system <<-EOS aws cloudformation delete-stack \ --stack-name '#{stack_name}' \ --profile '#{[:profile]}' EOS end |