Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/chkdfront/cli_operations.rb
Instance Method Summary collapse
- #blue ⇒ Object
- #bold ⇒ Object
- #colorize(text, color_code) ⇒ Object
- #cyan ⇒ Object
- #dark_blue ⇒ Object
- #dark_cyan ⇒ Object
- #dark_green ⇒ Object
- #dark_purple ⇒ Object
- #error ⇒ Object
- #green ⇒ Object
- #pure ⇒ Object
- #purple ⇒ Object
- #red ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#blue ⇒ Object
6 |
# File 'lib/chkdfront/cli_operations.rb', line 6 def blue; colorize(self, "\e[1m\e[34m"); end |
#bold ⇒ Object
13 |
# File 'lib/chkdfront/cli_operations.rb', line 13 def bold; colorize(self, "\e[1m"); end |
#colorize(text, color_code) ⇒ Object
15 |
# File 'lib/chkdfront/cli_operations.rb', line 15 def colorize(text, color_code) "#{color_code}#{text}\e[0m" end |
#cyan ⇒ Object
10 |
# File 'lib/chkdfront/cli_operations.rb', line 10 def cyan; colorize(self, "\e[1;36m"); end |
#dark_blue ⇒ Object
7 |
# File 'lib/chkdfront/cli_operations.rb', line 7 def dark_blue; colorize(self, "\e[34m"); end |
#dark_cyan ⇒ Object
11 |
# File 'lib/chkdfront/cli_operations.rb', line 11 def dark_cyan; colorize(self, "\e[36m"); end |
#dark_green ⇒ Object
4 |
# File 'lib/chkdfront/cli_operations.rb', line 4 def dark_green; colorize(self, "\e[32m"); end |
#dark_purple ⇒ Object
9 |
# File 'lib/chkdfront/cli_operations.rb', line 9 def dark_purple; colorize(self, "\e[1;35m"); end |
#error ⇒ Object
14 |
# File 'lib/chkdfront/cli_operations.rb', line 14 def error; colorize(self, "\n[" + " ✖ ".red + "] "); end |
#green ⇒ Object
3 |
# File 'lib/chkdfront/cli_operations.rb', line 3 def green; colorize(self, "\e[1m\e[32m"); end |
#pure ⇒ Object
12 |
# File 'lib/chkdfront/cli_operations.rb', line 12 def pure; colorize(self, "\e[0m\e[28m"); end |
#purple ⇒ Object
8 |
# File 'lib/chkdfront/cli_operations.rb', line 8 def purple; colorize(self, "\e[35m"); end |
#red ⇒ Object
2 |
# File 'lib/chkdfront/cli_operations.rb', line 2 def red; colorize(self, "\e[1m\e[31m"); end |
#yellow ⇒ Object
5 |
# File 'lib/chkdfront/cli_operations.rb', line 5 def yellow; colorize(self, "\e[1m\e[33m"); end |