diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-24 11:00:39 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-24 13:44:09 -0300 |
commit | f63308fdf593173291e5e553340e5aae21b35670 (patch) | |
tree | ebd6c4aa9574089c36328f76af2958e901604697 | |
parent | 8e3425b62d291c85329acd5e33b5eab736083260 (diff) | |
download | highline-f63308fdf593173291e5e553340e5aae21b35670.tar.gz |
Clone HighLine.use_color?
-rwxr-xr-x | lib/highline.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/highline.rb b/lib/highline.rb index 6162b25..05ca094 100755 --- a/lib/highline.rb +++ b/lib/highline.rb @@ -60,6 +60,11 @@ class HighLine @use_color end + # Returns true if HighLine instance is currently using color escapes. + def use_color? + @use_color + end + # For checking if the current version of HighLine supports RGB colors # Usage: HighLine.supports_rgb_color? rescue false # rescue for compatibility with older versions # Note: color usage also depends on HighLine.use_color being set |