summaryrefslogtreecommitdiff
path: root/lib/highline.rb
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 02:26:49 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 02:26:49 -0300
commit29a196464b9e65bcd54c10e2fec45e8f5eba4128 (patch)
tree59f57ee28e9a65ae5a96f1fcf897ddf1047e862f /lib/highline.rb
parent90d79ee9cb38c909dde3c284057f4494af609586 (diff)
downloadhighline-29a196464b9e65bcd54c10e2fec45e8f5eba4128.tar.gz
Add a way to change HighLine.default_instance (use on tests)
Diffstat (limited to 'lib/highline.rb')
-rwxr-xr-xlib/highline.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/highline.rb b/lib/highline.rb
index 3239439..a8b72d4 100755
--- a/lib/highline.rb
+++ b/lib/highline.rb
@@ -48,6 +48,10 @@ class HighLine
@default_instance ||= new
end
+ def self.default_instance=(highline_instance)
+ @default_instance = highline_instance
+ end
+
# Set it to false to disable ANSI coloring
attr_writer :use_color