Class: MethodLister::AnsiEscape
- Inherits:
-
Object
- Object
- MethodLister::AnsiEscape
- Defined in:
- lib/method_lister/color_display.rb
Constant Summary collapse
- Colors =
{ :none => 0, :black_fg => 30, :red_fg => 31, :green_fg => 32, :yellow_fg => 33, :blue_fg => 34, :magenta_fg => 35, :cyan_fg => 36, :white_fg => 37, :black_bg => 40, :red_bg => 41, :green_bg => 42, :yellow_bg => 43, :blue_bg => 44, :magenta_bg => 45, :cyan_bg => 46, :white_bg => 47, :bold => 1, :underline => 4, :blink => 5, :reverse => 7, :invisible => 8 }
Instance Method Summary collapse
Instance Method Details
#color_string(string, *colors) ⇒ Object
66 67 68 |
# File 'lib/method_lister/color_display.rb', line 66 def color_string(string, *colors) color_code(*colors) + string + color_code(:none) end |