diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-25 01:17:38 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-25 01:17:38 -0300 |
commit | 7c9975f982d58ab85baf5830b580acae04a2d953 (patch) | |
tree | 71799d98266b226fc6293e13aa4e99c377cb7668 | |
parent | 09bf55b401ee1d6082f15dffc8b460d7c7c71732 (diff) | |
download | highline-7c9975f982d58ab85baf5830b580acae04a2d953.tar.gz |
Makes HighLine.reset_use_color an ins meth
-rwxr-xr-x | lib/highline.rb | 5 | ||||
-rw-r--r-- | lib/highline/import.rb | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/highline.rb b/lib/highline.rb index 8476bcc..868f508 100755 --- a/lib/highline.rb +++ b/lib/highline.rb @@ -53,13 +53,10 @@ class HighLine end # Resets the use of color. - def self.reset_use_color + def reset_use_color @use_color = true end - # Use color output by default. - reset_use_color - # 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 diff --git a/lib/highline/import.rb b/lib/highline/import.rb index d4e70f5..aa0f3fd 100644 --- a/lib/highline/import.rb +++ b/lib/highline/import.rb @@ -59,4 +59,9 @@ class HighLine def self.use_color? $terminal.use_color? end + + # Resets the use of color. + def self.reset_use_color + $terminal.reset_use_color + end end |