Module: Rainbow

Defined in:
lib/rainbow.rb,
lib/rainbow/color.rb,
lib/rainbow/global.rb,
lib/rainbow/version.rb,
lib/rainbow/wrapper.rb,
lib/rainbow/presenter.rb,
lib/rainbow/ext/string.rb,
lib/rainbow/string_utils.rb,
lib/rainbow/null_presenter.rb,
lib/rainbow/x11_color_names.rb

Defined Under Namespace

Modules: Ext, X11ColorNames Classes: Color, NullPresenter, Presenter, StringUtils, Wrapper

Constant Summary collapse

VERSION =
"2.2.2".freeze

Class Method Summary collapse

Class Method Details

.enabledObject



9
10
11
# File 'lib/rainbow/global.rb', line 9

def self.enabled
  global.enabled
end

.enabled=(value) ⇒ Object



13
14
15
# File 'lib/rainbow/global.rb', line 13

def self.enabled=(value)
  global.enabled = value
end

.globalObject



5
6
7
# File 'lib/rainbow/global.rb', line 5

def self.global
  @global ||= Wrapper.new
end

.newObject



6
7
8
# File 'lib/rainbow.rb', line 6

def self.new
  Wrapper.new(global.enabled)
end