summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-25 01:23:10 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-25 01:23:10 -0300
commit31ec9d422fd8fd70ff1760d3059d6606e09e4ed9 (patch)
tree87e8cabd869b007b8a0250760918d26cb4be9695
parente54a06cd3039f8654fd4dbfc0083b62dc1b852f8 (diff)
downloadhighline-31ec9d422fd8fd70ff1760d3059d6606e09e4ed9.tar.gz
They're just delegators. Follow previous convention.pr_211_option
-rw-r--r--lib/highline/import.rb20
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