diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 23:03:21 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 23:03:21 -0300 |
commit | fd1564ab651c8e1612b424bb30d5b82a65b63d9a (patch) | |
tree | d52ef48aea69f6b0de797f990d38c491e8a0daf0 | |
parent | 9f0f0e8e45aed0c067f5bf1145703f6330c5244e (diff) | |
download | highline-fd1564ab651c8e1612b424bb30d5b82a65b63d9a.tar.gz |
Use attr_accessor for color_scheme
-rwxr-xr-x | lib/highline.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/highline.rb b/lib/highline.rb index 8b428b8..6b1be91 100755 --- a/lib/highline.rb +++ b/lib/highline.rb @@ -53,6 +53,9 @@ class HighLine class << self attr_accessor :default_instance + # Pass ColorScheme to set a HighLine color scheme. + attr_accessor :color_scheme + # 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 @@ -60,16 +63,6 @@ class HighLine def supports_rgb_color? true end - - # Pass ColorScheme to _setting_ to set a HighLine color scheme. - def color_scheme=( setting ) - @color_scheme = setting - end - - # Returns the current color scheme. - def color_scheme - @color_scheme - end end # The setting used to control color schemes. |