Sha256: 92172f0b82b8285d2ad07d932a48b20b3ca8618cf0ca2edd06e2e715cc2934f2
Contents?: true
Size: 284 Bytes
Versions: 36
Compression:
Stored size: 284 Bytes
Contents
module Util def self.prompt(msg, prompt = "(y)es, (n)o ") answer = Capistrano::CLI.ui.ask("#{msg} #{prompt} ? ") do |q| q.overwrite = false q.validate = /^y$|^yes$|^n$|^no$/i q.responses[:not_valid] = prompt end (answer =~ /^y$|^yes$/i) == 0 end end
Version data entries
36 entries across 36 versions & 3 rubygems