Class: Ronin::UI::Output::Terminal::Color
- Defined in:
- lib/ronin/ui/output/terminal/color.rb
Overview
The handler for color output to the terminal.
Constant Summary collapse
- GREEN =
ANSI Green code
"\e[32m"
- CYAN =
ANSI Cyan code
"\e[36m"
- YELLOW =
ANSI Yellow code
"\e[33m"
- RED =
ANSI Red code
"\e[31m"
- CLEAR =
ANSI Clear code
"\e[0m"
Class Method Summary collapse
-
.print_debug(message) ⇒ Object
private
Prints a
debug
message. -
.print_error(message) ⇒ Object
private
Prints an
error
message. -
.print_info(message) ⇒ Object
private
Prints an
info
message. -
.print_warning(message) ⇒ Object
private
Prints a
warning
message. -
.write(data) ⇒ Object
private
Writes data to
STDOUT
.
Class Method Details
.print_debug(message) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Prints a debug
message.
82 83 84 |
# File 'lib/ronin/ui/output/terminal/color.rb', line 82 def self.print_debug() puts "#{CYAN}[=] #{}#{CLEAR}" end |
.print_error(message) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Prints an error
message.
110 111 112 |
# File 'lib/ronin/ui/output/terminal/color.rb', line 110 def self.print_error() puts "#{RED}[!] #{}#{CLEAR}" end |
.print_info(message) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Prints an info
message.
68 69 70 |
# File 'lib/ronin/ui/output/terminal/color.rb', line 68 def self.print_info() puts "#{GREEN}[-] #{}#{CLEAR}" end |
.print_warning(message) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Prints a warning
message.
96 97 98 |
# File 'lib/ronin/ui/output/terminal/color.rb', line 96 def self.print_warning() puts "#{YELLOW}[*] #{}#{CLEAR}" end |