summaryrefslogtreecommitdiff
path: root/lib/highline.rb
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 02:09:56 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 02:09:56 -0300
commitcee967f6b11372b63840b594a5089d4c182039ac (patch)
tree23405e7d184029ce7e100f937c825640938b537c /lib/highline.rb
parent536d7e29c490df37d6ffeac43de64ba54563e53f (diff)
downloadhighline-cee967f6b11372b63840b594a5089d4c182039ac.tar.gz
Add HighLine.default_instance
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 868f508..a66e8aa 100755
--- a/lib/highline.rb
+++ b/lib/highline.rb
@@ -44,6 +44,10 @@ class HighLine
include BuiltinStyles
include CustomErrors
+ def self.default_instance
+ @default_instance ||= new
+ end
+
# Set it to false to disable ANSI coloring
attr_writer :use_color