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/refinement.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 =
"3.1.1"

Class Method Summary collapse

Class Method Details

.enabledObject



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

def self.enabled
  global.enabled
end

.enabled=(value) ⇒ Object



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

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

.globalObject



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

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

.uncolor(string) ⇒ Object



18
19
20
# File 'lib/rainbow/global.rb', line 18

def self.uncolor(string)
  StringUtils.uncolor(string)
end