Module: Kubes::Util::Sure
- Included in:
- CLI::Delete, CLI::Prune
- Defined in:
- lib/kubes/util/sure.rb
Instance Method Summary collapse
Instance Method Details
#sure?(message = "Are you sure?") ⇒ Boolean
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/kubes/util/sure.rb', line 3 def sure?(="Are you sure?") if @options[:yes] sure = 'y' else print "#{} (y/N) " sure = $stdin.gets end unless sure =~ /^y/ puts "Whew! Exiting." exit 0 end end |