vendor/bundle/ruby/1.8/gems/io-reactor-1.0.4/rake/helpers.rb
### Prompt for an array of values
Prompt for an array of values
Prompt for an array of values
def prompt_for_multiple_values( label, default=nil )
    $stderr.puts( MULTILINE_PROMPT % [label] )
    if default
		$stderr.puts "Enter a single blank line to keep the default:\n  %p" % [ default ]
	end
    results = []
    result = nil
    begin
        result = Readline.readline( make_prompt_string("> ") )
		if result.nil? || result.empty?
			results << default if default && results.empty?
		else
        	results << result 
		end
    end until result.nil? || result.empty?
    return results.flatten
end
def prompt_for_multiple_values ( label , default = nil ) $stderr . puts ( MULTILINE_PROMPT % [ label ] ) if default $stderr . puts "Enter a single blank line to keep the default:\n  %p" % [ default ] end results = [ ] result = nil begin result = Readline . readline ( make_prompt_string ( "> " ) ) if result . nil? || result . empty? results << default if default && results . empty? else results << result end end until result . nil? || result . empty? return results . flatten end
Prompt for an array of values
Prompt for an array of values
label
default