Class EasyPrompt
In: easyprompt.rb
Parent: Object


ask   new  

Classes and Modules

Class EasyPrompt::MockCommandLineUser


Version = '0.1.3'

Public Class methods

Public Instance methods

Asks the user for input.

msg:The prompt that tells the user what information to enter next.
default:The default value that will be returned if the user enters a newline (usually by pressing "Enter") without typing any information. The default value will be displayed in square brackets after msg.
response_class:The sort of value that EasyPrompt#ask should return. Valid response classes are:
This is the default.
Takes an arbitrary number of lines entered by the user, and returns them as an array. The entry stops when the user enters a blank line.
Values will be turned into true or false depending on whether the user enters "y" or "n".
Values will be read as a regular expression source. If the user enters an invalid regexp source, EasyPrompt will re-prompt until a valid regexp source is entered.