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