summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 23:00:56 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 23:00:56 -0300
commit9f0f0e8e45aed0c067f5bf1145703f6330c5244e (patch)
tree06cbc681025ea5dad5cc9a2fa3f5d84b6205791a
parent79f6677abd5471a76b177a5c9826ee7601102554 (diff)
downloadhighline-9f0f0e8e45aed0c067f5bf1145703f6330c5244e.tar.gz
Group color_scheme meths at eigen class
-rwxr-xr-xlib/highline.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/highline.rb b/lib/highline.rb
index 8e9f083..8b428b8 100755
--- a/lib/highline.rb
+++ b/lib/highline.rb
@@ -60,8 +60,21 @@ 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.
+ @color_scheme = nil
+
# Set it to false to disable ANSI coloring
attr_writer :use_color
@@ -85,19 +98,6 @@ class HighLine
@track_eof
end
- # The setting used to control color schemes.
- @color_scheme = nil
-
- # Pass ColorScheme to _setting_ to set a HighLine color scheme.
- def self.color_scheme=( setting )
- @color_scheme = setting
- end
-
- # Returns the current color scheme.
- def self.color_scheme
- @color_scheme
- end
-
# Returns +true+ if HighLine is currently using a color scheme.
def self.using_color_scheme?
!!@color_scheme