module Inquirer::Console
Overview
Provides Inquirer with standardized style & utilities for printing stuff on the screen.
Extended Modules
Defined in:
inquirer/console.crConstant Summary
-
COLUMNS =
(`tput cols`).to_i? || 80
-
The amount of columns in the terminal.
Instance Method Summary
-
#done(message : String)
Displays a done plaque followed by message.
-
#error(message : String)
Displays an error plaque followed by message.
-
#exit(status : Int32, message : String)
Calls
#error(message)
and exits with the given status. -
#log(message : String)
Displays a log plaque followed by message.
-
#overwrite(message : String)
Stacks the given message on top of an
#update
. -
#quit(with message : String)
Prints the given message and exits with status 0.
-
#update(message : String)
Prints the given message so that the next call, it changes in-place.
Macro Summary
-
comment(before, after, given)
Returns given, logging message before beforehand and message after afterwards.
Instance Method Detail
Prints the given message so that the next call, it changes in-place.
Returns the carriage to the start of the line, clears the line, and prints message with no trailing newline.
Cuts off message if it doesn't fit (see COLUMNS
).
Returns nothing.
Macro Detail
Returns given, logging message before beforehand and message after afterwards.