alert_error

alert_error(statement, question=nil) Instance Public methods Display an error message in a location expected to get error messages. Will ask question if it is not nil.

alert_warning

alert_warning(statement, question=nil) Instance Public methods Display a warning in a location expected to get error messages. Will ask question if it is not nil.

ask

ask(question) Instance Public methods Ask a question. Returns an answer if connected to a tty, nil otherwise.

ask_for_password

ask_for_password(question) Instance Public methods Ask for a password. Does not echo response to terminal.

ask_for_password_on_unix

ask_for_password_on_unix() Instance Public methods Asks for a password that works on unix

ask_for_password_on_windows

ask_for_password_on_windows() Instance Public methods Asks for a password that works on windows. Ripped from the Heroku gem.

ask_yes_no

ask_yes_no(question, default=nil) Instance Public methods Ask a question. Returns a true for yes, false for no. If not connected to a tty, raises an exception if default is nil, otherwise returns default.

backtrace

backtrace(exception) Instance Public methods Prints a formatted backtrace to the errors stream if backtraces are enabled.

choose_from_list

choose_from_list(question, list) Instance Public methods Choose from a list of options. question is a prompt displayed above the list. list is a list of option strings. Returns the pair [option_name, option_index].

debug

debug(statement) Instance Public methods Display a debug message on the same location as error messages.