Class EasyPrompt
In: easyprompt.rb
Parent: Object

Methods

ask   new  

Classes and Modules

Class EasyPrompt::MockCommandLineUser

Constants

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:
:string
This is the default.
:array
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.
:boolean
Values will be turned into true or false depending on whether the user enters "y" or "n".
:regexp
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.

[Validate]