Class: Thor::Shell::Basic
- Inherits:
-
Object
- Object
- Thor::Shell::Basic
- Defined in:
- lib/bundler/audit/cli/thor_ext/shell/basic/say_error.rb
Instance Method Summary collapse
-
#say_error(message, color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/)) ⇒ Object
Prints an error message to
stderr
.
Instance Method Details
#say_error(message, color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/)) ⇒ Object
Prints an error message to stderr
.
16 17 18 19 20 21 22 23 24 |
# File 'lib/bundler/audit/cli/thor_ext/shell/basic/say_error.rb', line 16 def say_error(,color=nil,force_new_line=(.to_s !~ /( |\t)\Z/)) return if quiet? buffer = (,*color) buffer << $/ if force_new_line && !.to_s.end_with?($/) stderr.print(buffer) stderr.flush end |