AskSettings
public class AskSettings<T: ArgConvertibleType>
Settings used to costumize the behaviour of ask()
-
Default value to set incase the user entered a blank
Declaration
Swift
public var defaultValue: T?
-
If set to true, another message will follow successful user entry asking the user to confirm his selection
Declaration
Swift
public var confirm = false
-
Add an invalid entry case
Declaration
Swift
public func addInvalidCase(description: String, invalidIfTrue: (T -> Bool))
Parameters
description
The string to be printed to the stdout if the case is invalid
invalidIfTrue
If true is returned, then the user input was invalid, if false, the user input was valid.