diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 02:26:49 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 02:26:49 -0300 |
commit | 29a196464b9e65bcd54c10e2fec45e8f5eba4128 (patch) | |
tree | 59f57ee28e9a65ae5a96f1fcf897ddf1047e862f /lib/highline.rb | |
parent | 90d79ee9cb38c909dde3c284057f4494af609586 (diff) | |
download | highline-29a196464b9e65bcd54c10e2fec45e8f5eba4128.tar.gz |
Add a way to change HighLine.default_instance (use on tests)
Diffstat (limited to 'lib/highline.rb')
-rwxr-xr-x | lib/highline.rb | 4 |
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 |