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.0.0".freeze
Class Method Summary
collapse
Class Method Details
.enabled ⇒ Object
8
9
10
|
# File 'lib/rainbow/global.rb', line 8
def self.enabled
global.enabled
end
|
.enabled=(value) ⇒ Object
12
13
14
|
# File 'lib/rainbow/global.rb', line 12
def self.enabled=(value)
global.enabled = value
end
|
.global ⇒ Object
4
5
6
|
# File 'lib/rainbow/global.rb', line 4
def self.global
@global ||= Wrapper.new
end
|
.new ⇒ Object
4
5
6
|
# File 'lib/rainbow.rb', line 4
def self.new
Wrapper.new(global.enabled)
end
|
.uncolor(string) ⇒ Object
16
17
18
|
# File 'lib/rainbow/global.rb', line 16
def self.uncolor(string)
StringUtils.uncolor(string)
end
|