Sha256: b1119cf9e7612822206c0ce0abf3e5913d1973b9dbc9acafed395bebda5f6839

Contents?: true

Size: 382 Bytes

Versions: 2

Compression:

Stored size: 382 Bytes

Contents

module Another
  module Confirmer
    def confirmed?
      say "Warning: Creating new projects makes you vulnerable to mockery.".bold
      answer ? true : begin
        say "Probably for the best."
      end
    end
    
    private
    
    def answer
      ask "Are you sure you want to create a new project? ".bold do |answer|
        answer =~ /^y/i
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
another-0.0.4 lib/another/confirmer.rb
another-0.0.6 lib/another/confirmer.rb