diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 23:05:42 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 23:05:42 -0300 |
commit | 00aeda601df74b0d939d12a702fd21832f75972c (patch) | |
tree | f4895f4e5c846105d0ea8eb65e9048f8688f6b00 | |
parent | fd1564ab651c8e1612b424bb30d5b82a65b63d9a (diff) | |
download | highline-00aeda601df74b0d939d12a702fd21832f75972c.tar.gz |
Group using_color_scheme? at eigen class
-rwxr-xr-x | lib/highline.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/highline.rb b/lib/highline.rb index 6b1be91..cac1776 100755 --- a/lib/highline.rb +++ b/lib/highline.rb @@ -56,6 +56,11 @@ class HighLine # Pass ColorScheme to set a HighLine color scheme. attr_accessor :color_scheme + # Returns +true+ if HighLine is currently using a color scheme. + def using_color_scheme? + !!@color_scheme + 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 @@ -91,11 +96,6 @@ class HighLine @track_eof end - # Returns +true+ if HighLine is currently using a color scheme. - def self.using_color_scheme? - !!@color_scheme - end - # Reset HighLine to default. # Clears Style index and resets color_scheme and use_color settings. def self.reset |