diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-25 01:23:10 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-25 01:23:10 -0300 |
commit | 31ec9d422fd8fd70ff1760d3059d6606e09e4ed9 (patch) | |
tree | 87e8cabd869b007b8a0250760918d26cb4be9695 | |
parent | e54a06cd3039f8654fd4dbfc0083b62dc1b852f8 (diff) | |
download | highline-31ec9d422fd8fd70ff1760d3059d6606e09e4ed9.tar.gz |
They're just delegators. Follow previous convention.pr_211_option
-rw-r--r-- | lib/highline/import.rb | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/highline/import.rb b/lib/highline/import.rb index aa0f3fd..157752d 100644 --- a/lib/highline/import.rb +++ b/lib/highline/import.rb @@ -24,7 +24,8 @@ $terminal = HighLine.new # module Kernel extend Forwardable - def_delegators :$terminal, :agree, :ask, :choose, :say + def_delegators :$terminal, :agree, :ask, :choose, :say, + :use_color=, :use_color?, :reset_use_color end # When requiring 'highline/import' HighLine adds {#or_ask} to Object so @@ -48,20 +49,3 @@ class Object end end end - -class HighLine - # Pass +false+ to _setting_ to turn off HighLine's color escapes. - def self.use_color=(setting) - $terminal.use_color = setting - end - - # Returns true if HighLine is currently using color escapes. - def self.use_color? - $terminal.use_color? - end - - # Resets the use of color. - def self.reset_use_color - $terminal.reset_use_color - end -end |