diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 23:06:48 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 23:06:48 -0300 |
commit | f22b352e8f17d4dbe3110e6f8096ef9114dc899e (patch) | |
tree | d91a1611990f0c6f7f2d800e3b2d87a91715563d | |
parent | 00aeda601df74b0d939d12a702fd21832f75972c (diff) | |
download | highline-f22b352e8f17d4dbe3110e6f8096ef9114dc899e.tar.gz |
Group HighLine.reset at eigen class
-rwxr-xr-x | lib/highline.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/highline.rb b/lib/highline.rb index cac1776..ecb0630 100755 --- a/lib/highline.rb +++ b/lib/highline.rb @@ -61,6 +61,14 @@ class HighLine !!@color_scheme end + # Reset HighLine to default. + # Clears Style index and resets color_scheme and use_color settings. + def reset + Style.clear_index + reset_color_scheme + reset_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 @@ -96,14 +104,6 @@ class HighLine @track_eof end - # Reset HighLine to default. - # Clears Style index and resets color_scheme and use_color settings. - def self.reset - Style.clear_index - reset_color_scheme - reset_use_color - end - # Reset color scheme to default (+nil+) def self.reset_color_scheme self.color_scheme = nil |