class Thor::Shell::Basic
Public Instance Methods
say_error(message,color=nil,force_new_line=(message.to_s !~ /( |\t)\Z/))
click to toggle source
Prints an error message to ‘stderr`.
@param [String] message
The message to print to `stderr`.
@param [Symbol, nil] color
Optional ANSI color.
@param [Boolean] force_new_line
Controls whether a newline character will be appended to the output.
# File lib/bundler/audit/cli/thor_ext/shell/basic/say_error.rb, line 16 def say_error(message,color=nil,force_new_line=(message.to_s !~ /( |\t)\Z/)) return if quiet? buffer = prepare_message(message,*color) buffer << $/ if force_new_line && !message.to_s.end_with?($/) stderr.print(buffer) stderr.flush end