Sha256: a82e1c84f8c927b8e66a478d8de7e52fea3ea06782a99634002f304a1f835a68

Contents?: true

Size: 298 Bytes

Versions: 6847

Compression:

Stored size: 298 Bytes

Contents

# frozen_string_literal: true

require_relative 'rainbow/global'

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'
end

Version data entries

6,847 entries across 6,847 versions & 36 rubygems

Version Path
rainbow-3.1.1 lib/rainbow.rb
buildkite-builder-1.0.0 lib/vendor/rainbow/lib/rainbow.rb
buildkite-builder-1.0.0.beta.5 lib/vendor/rainbow/lib/rainbow.rb
buildkite-builder-1.0.0.beta.4 lib/vendor/rainbow/lib/rainbow.rb
buildkite-builder-1.0.0.beta.3 lib/vendor/rainbow/lib/rainbow.rb
buildkite-builder-1.0.0.beta.2 lib/vendor/rainbow/lib/rainbow.rb
buildkite-builder-1.0.0.beta.1 lib/vendor/rainbow/lib/rainbow.rb