vendor/bundle/ruby/1.8/gems/io-reactor-1.0.4/rake/helpers.rb
### Display a description of a potentially-dangerous task, and prompt
### for confirmation. If the user answers with anything that begins
### with 'y', yield to the block, else raise with an error.
Display a description of a potentially-dangerous task, and prompt
for confirmation. If the user answers with anything that begins
with 'y', yield to the block, else raise with an error.
Display a description of a potentially - dangerous task and prompt for confirmation . If the user answers with anything that begins with ' y ' yield to the block else raise with an error .
def ask_for_confirmation( description )
	puts description
	answer = prompt_with_default( "Continue?", 'n' ) do |input|
		input =~ /^[yn]/i
	end
	case answer
	when /^y/i
		yield
	else
		error "Aborted."
		fail
	end
end
def ask_for_confirmation ( description ) puts description answer = prompt_with_default ( "Continue?" , 'n' ) do | input | input =~ / ^[yn] /i end case answer when / ^y /i yield else error "Aborted." fail end end
Display a description of a potentially-dangerous task, and prompt
for confirmation.
Display a description of a potentially - dangerous task and prompt for confirmation .
description