Sha256: 6e38d2b67a29739331de5b5c98e6905cad4af7880b70e99057f019c68dcaacf5
Contents?: true
Size: 421 Bytes
Versions: 9
Compression:
Stored size: 421 Bytes
Contents
module TerraspaceBundler::Util module Sure def sure?(message="Are you sure?", desc=nil) if @options[:yes] sure = 'y' else out = if desc "\n#{desc}\n#{message} (y/N) " else "#{message} (y/N) " end print out sure = $stdin.gets end unless sure =~ /^y/ puts "Whew! Exiting." exit 0 end end end end
Version data entries
9 entries across 9 versions & 1 rubygems