Sha256: 7c345a2970144b9c0af814c46fecb34a9a20248f2c09250af86f822f88a0d813

Contents?: true

Size: 297 Bytes

Versions: 58

Compression:

Stored size: 297 Bytes

Contents

module Kubes::Util
  module Sure
    def sure?(message="Are you sure?")
      if @options[:yes]
        sure = 'y'
      else
        print "#{message} (y/N) "
        sure = $stdin.gets
      end

      unless sure =~ /^y/
        puts "Whew! Exiting."
        exit 0
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
kubes-0.9.3 lib/kubes/util/sure.rb
kubes-0.9.2 lib/kubes/util/sure.rb
kubes-0.9.1 lib/kubes/util/sure.rb
kubes-0.9.0 lib/kubes/util/sure.rb
kubes-0.8.10 lib/kubes/util/sure.rb
kubes-0.8.9 lib/kubes/util/sure.rb
kubes-0.8.8 lib/kubes/util/sure.rb
kubes-0.8.7 lib/kubes/util/sure.rb
kubes-0.8.6 lib/kubes/util/sure.rb
kubes-0.8.5 lib/kubes/util/sure.rb
kubes-0.8.4 lib/kubes/util/sure.rb
kubes-0.8.3 lib/kubes/util/sure.rb
kubes-0.8.2 lib/kubes/util/sure.rb
kubes-0.8.1 lib/kubes/util/sure.rb
kubes-0.8.0 lib/kubes/util/sure.rb
kubes-0.7.10 lib/kubes/util/sure.rb
kubes-0.7.9 lib/kubes/util/sure.rb
kubes-0.7.8 lib/kubes/util/sure.rb
kubes-0.7.7 lib/kubes/util/sure.rb
kubes-0.7.6 lib/kubes/util/sure.rb