Module: CommandKit::Printing
- Includes:
- Stdio
- Included in:
- Command, ExceptionHandler, Options::Parser
- Defined in:
- lib/command_kit/printing.rb,
lib/command_kit/printing/indent.rb
Overview
Provides printing methods.
Defined Under Namespace
Modules: Indent
Constant Summary collapse
- EOL =
Platform independency new-line constant
$/
Instance Method Summary collapse
-
#print_error(message) ⇒ Object
Prints the error message to stderr.
-
#print_exception(error) ⇒ Object
Prints an exception to stderr.
Methods included from Stdio
#abort, #gets, #initialize, #print, #printf, #putc, #puts, #readline, #readlines, #stderr, #stdin, #stdout
Instance Method Details
#print_error(message) ⇒ Object
Prints the error message to stderr.
30 31 32 |
# File 'lib/command_kit/printing.rb', line 30 def print_error() stderr.puts end |
#print_exception(error) ⇒ Object
Prints an exception to stderr.
51 52 53 |
# File 'lib/command_kit/printing.rb', line 51 def print_exception(error) print_error error.(highlight: stderr.tty?) end |