module Gem::Tasks::Printing
Provides helper methods for printing messages.
@api semipublic
Constants
- ANSI_BRIGHT
ANSI 'bright' color code
- ANSI_CLEAR
ANSI 'clear' color code
- ANSI_GREEN
ANSI 'green' color code
- ANSI_RED
ANSI 'red' color code
- ANSI_YELLOW
ANSI 'yellow' color code
- DEBUG_PREFIX
Prefix for all debugging messages
- ERROR_PREFIX
Prefix for all error messages
- STATUS_PREFIX
Prefix for all status messages
Protected Instance Methods
debug(message)
click to toggle source
Prints a debugging message.
@param [String] message
The message to print.
# File lib/rubygems/tasks/printing.rb, line 66 def debug(message) if (Rake.verbose && Rake.application.options.trace) $stderr.puts "#{DEBUG_PREFIX} #{message}" end end
error(message)
click to toggle source
Prints an error message and exits.
@param [String] message
The message to print.
# File lib/rubygems/tasks/printing.rb, line 78 def error(message) $stderr.puts "#{ERROR_PREFIX} #{message}" end
status(message)
click to toggle source
Prints a status message.
@param [String] message
The message to print.
# File lib/rubygems/tasks/printing.rb, line 54 def status(message) if Rake.verbose $stdout.puts "#{STATUS_PREFIX} #{message}" end end
Private Instance Methods
fu_output_message(message)
click to toggle source
The FileUtils output method.
@param [String] message
The FileUtils message to print.
@since 0.2.1
# File lib/rubygems/tasks/printing.rb, line 92 def fu_output_message(message) debug(message) end