Sha256: 945301063721ed0c8ad56dbb0096d5006403c50097b002752d9194b5abf3e827
Contents?: true
Size: 560 Bytes
Versions: 2
Compression:
Stored size: 560 Bytes
Contents
require 'rainbow/global' require 'rainbow/legacy' require 'rainbow/ext/string' module Rainbow def self.new Wrapper.new(global.enabled) end self.enabled = false unless STDOUT.tty? && STDERR.tty? self.enabled = false if ENV['TERM'] == 'dumb' self.enabled = true if ENV['CLICOLOR_FORCE'] == '1' # On Windows systems, try to load the local ANSI support library require 'rbconfig' if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ begin require 'Win32/Console/ANSI' rescue LoadError self.enabled = false end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rainbow-1.99.2 | lib/rainbow.rb |
rainbow-1.99.1 | lib/rainbow.rb |