Module: FunCi::Tui::Ansi
- Defined in:
- lib/fun_ci/tui/ansi.rb
Constant Summary collapse
- RESET =
"\e[0m"
Class Method Summary collapse
- .bg_charcoal(text) ⇒ Object
- .bg_dark_green(text) ⇒ Object
- .bg_dark_red(text) ⇒ Object
- .bg_dark_yellow(text) ⇒ Object
- .bg_orange(text) ⇒ Object
- .bg_very_dark_red(text) ⇒ Object
- .bold_cyan(text) ⇒ Object
- .bold_green(text) ⇒ Object
- .bold_red(text) ⇒ Object
- .bold_white(text) ⇒ Object
- .bold_yellow(text) ⇒ Object
- .cyan(text) ⇒ Object
- .dark_red(text) ⇒ Object
- .dim(text) ⇒ Object
- .dim_green(text) ⇒ Object
- .dim_red(text) ⇒ Object
- .green(text) ⇒ Object
- .orange(text) ⇒ Object
- .strip(text) ⇒ Object
- .white(text) ⇒ Object
- .yellow(text) ⇒ Object
Class Method Details
.bg_charcoal(text) ⇒ Object
22 |
# File 'lib/fun_ci/tui/ansi.rb', line 22 def self.bg_charcoal(text) = "\e[48;5;236m#{text}#{RESET}" |
.bg_dark_green(text) ⇒ Object
26 |
# File 'lib/fun_ci/tui/ansi.rb', line 26 def self.bg_dark_green(text) = "\e[48;5;22m#{text}#{RESET}" |
.bg_dark_red(text) ⇒ Object
23 |
# File 'lib/fun_ci/tui/ansi.rb', line 23 def self.bg_dark_red(text) = "\e[48;5;124m#{text}#{RESET}" |
.bg_dark_yellow(text) ⇒ Object
27 |
# File 'lib/fun_ci/tui/ansi.rb', line 27 def self.bg_dark_yellow(text) = "\e[48;5;58m#{text}#{RESET}" |
.bg_orange(text) ⇒ Object
24 |
# File 'lib/fun_ci/tui/ansi.rb', line 24 def self.bg_orange(text) = "\e[48;5;166m#{text}#{RESET}" |
.bg_very_dark_red(text) ⇒ Object
25 |
# File 'lib/fun_ci/tui/ansi.rb', line 25 def self.bg_very_dark_red(text) = "\e[48;5;52m#{text}#{RESET}" |
.bold_cyan(text) ⇒ Object
13 |
# File 'lib/fun_ci/tui/ansi.rb', line 13 def self.bold_cyan(text) = "\e[1;36m#{text}#{RESET}" |
.bold_green(text) ⇒ Object
9 |
# File 'lib/fun_ci/tui/ansi.rb', line 9 def self.bold_green(text) = "\e[1;32m#{text}#{RESET}" |
.bold_red(text) ⇒ Object
10 |
# File 'lib/fun_ci/tui/ansi.rb', line 10 def self.bold_red(text) = "\e[1;31m#{text}#{RESET}" |
.bold_white(text) ⇒ Object
15 |
# File 'lib/fun_ci/tui/ansi.rb', line 15 def self.bold_white(text) = "\e[1;37m#{text}#{RESET}" |
.bold_yellow(text) ⇒ Object
11 |
# File 'lib/fun_ci/tui/ansi.rb', line 11 def self.bold_yellow(text) = "\e[1;33m#{text}#{RESET}" |
.cyan(text) ⇒ Object
12 |
# File 'lib/fun_ci/tui/ansi.rb', line 12 def self.cyan(text) = "\e[36m#{text}#{RESET}" |
.dark_red(text) ⇒ Object
21 |
# File 'lib/fun_ci/tui/ansi.rb', line 21 def self.dark_red(text) = "\e[38;5;52m#{text}#{RESET}" |
.dim(text) ⇒ Object
14 |
# File 'lib/fun_ci/tui/ansi.rb', line 14 def self.dim(text) = "\e[2m#{text}#{RESET}" |
.dim_green(text) ⇒ Object
18 |
# File 'lib/fun_ci/tui/ansi.rb', line 18 def self.dim_green(text) = "\e[2;32m#{text}#{RESET}" |
.dim_red(text) ⇒ Object
19 |
# File 'lib/fun_ci/tui/ansi.rb', line 19 def self.dim_red(text) = "\e[2;31m#{text}#{RESET}" |
.green(text) ⇒ Object
8 |
# File 'lib/fun_ci/tui/ansi.rb', line 8 def self.green(text) = "\e[32m#{text}#{RESET}" |
.orange(text) ⇒ Object
20 |
# File 'lib/fun_ci/tui/ansi.rb', line 20 def self.orange(text) = "\e[38;5;208m#{text}#{RESET}" |
.strip(text) ⇒ Object
29 30 31 |
# File 'lib/fun_ci/tui/ansi.rb', line 29 def self.strip(text) text.gsub(/\e\[[0-9;]*[A-Za-z]/, "") end |
.white(text) ⇒ Object
16 |
# File 'lib/fun_ci/tui/ansi.rb', line 16 def self.white(text) = "\e[37m#{text}#{RESET}" |
.yellow(text) ⇒ Object
17 |
# File 'lib/fun_ci/tui/ansi.rb', line 17 def self.yellow(text) = "\e[33m#{text}#{RESET}" |