Class: Ufo::CLI::Clean
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods included from Utils::Sure
Methods included from Utils::Pretty
#pretty_home, #pretty_path, #pretty_time
Methods included from Utils::Logging
Methods included from Ufo::Concerns
Methods included from Ufo::Concerns::Names
Methods included from AwsServices
#acm, #applicationautoscaling, #aws_options, #cloudformation, #cloudwatchlogs, #ec2, #ecr, #ecs, #elb, #find_stack, #ssm_client, #stack_resources, #status, #task_definition_arns
Constructor Details
This class inherits a constructor from Ufo::CLI::Base
Instance Method Details
#run ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/ufo/cli/clean.rb', line 3 def run folders = %w[log output tmp] folders = folders.map do |folder| ".ufo/#{folder}" end sure?("Will remove folders: #{folders.join(' ')}") folders.each do |folder| FileUtils.rm_rf("#{Ufo.root}/#{folder}") end logger.info "Removed folders: #{folders.join(' ')}" end |