Class: Gantree::Delete
Instance Method Summary collapse
-
#initialize(stack_name, options) ⇒ Delete
constructor
A new instance of Delete.
- #run(input = "") ⇒ Object
Methods inherited from Base
#authenticate_librato, #cfm, #check_credentials, check_for_updates, #check_template_bucket, #create_default_env, #eb, #env_type, #error_msg, #escape_characters_in_string, #get_latest_docker_solution, #print_options, #s3, #set_aws_keys, #tag, update_configuration, #upload_templates
Constructor Details
#initialize(stack_name, options) ⇒ Delete
Returns a new instance of Delete.
7 8 9 10 11 12 |
# File 'lib/gantree/delete.rb', line 7 def initialize stack_name, check_credentials set_aws_keys @stack_name = stack_name @options = end |
Instance Method Details
#run(input = "") ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/gantree/delete.rb', line 14 def run input="" input = "y" if @options[:force] input ||= ask "Are you sure? (y|n)" if input == "y" || @options[:force] puts "Deleting stack from aws" return if @options[:dry_run] puts "Deleted".green if cfm.stacks[@stack_name].delete else puts "canceling...".yellow end end |