Module: LonoCfn::Util
Instance Method Summary collapse
Instance Method Details
#are_you_sure?(action) ⇒ Boolean
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lono-cfn/util.rb', line 3 def are_you_sure?(action) if @options[:sure] sure = 'y' else = case action when :update "Are you sure you want to want to update the stack with the changes? (y/N)" when :delete "Are you sure you want to want to delete the stack with the changes? (y/N)" end puts sure = $stdin.gets end unless sure =~ /^y/ puts "Exiting without #{action}" exit 0 end end |