summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 22:57:46 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 22:57:46 -0300
commit79f6677abd5471a76b177a5c9826ee7601102554 (patch)
tree58bca0c041112d52afe08f4b121c6ba964a8937f
parent850f8957917c60524deae1812e41c4094d769fbf (diff)
downloadhighline-79f6677abd5471a76b177a5c9826ee7601102554.tar.gz
Group supports_rgb_color? at eigen class
-rwxr-xr-xlib/highline.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/highline.rb b/lib/highline.rb
index 29b6b89..8e9f083 100755
--- a/lib/highline.rb
+++ b/lib/highline.rb
@@ -52,6 +52,14 @@ class HighLine
class << self
attr_accessor :default_instance
+
+ # 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
+ # TODO: Discuss removing this method
+ def supports_rgb_color?
+ true
+ end
end
# Set it to false to disable ANSI coloring
@@ -67,13 +75,6 @@ class HighLine
@use_color = true
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
- def self.supports_rgb_color?
- true
- end
-
# Pass +false+ to _setting_ to turn off HighLine's EOF tracking.
def track_eof=(setting)
@track_eof = setting