A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.rubydoc.info/gems/rake-compiler-dock/RakeCompilerDock/Colors below:

Colors – Documentation for rake-compiler-dock (1.9.1) – RubyDoc.info

Module: RakeCompilerDock::Colors
Included in:
DockerCheck
Defined in:
lib/rake_compiler_dock/colors.rb
Constant Summary collapse
ESC =
"\e["
NND =
"#{ESC}0m"
ColorMap =
{
  black: 0,
  red: 1,
  green: 2,
  yellow: 3,
  blue: 4,
  magenta: 5,
  cyan: 6,
  white: 7,
}
Instance Method Summary collapse Instance Method Details #colored(color, string) ⇒ Object
26
27
28
29
30
31
32
33
# File 'lib/rake_compiler_dock/colors.rb', line 26

def colored(color, string)
  if @colors_on
    c = ColorMap[color] || color
    "#{ESC}#{30+c}m#{string}#{NND}"
  else
    string.dup
  end
end
#disable_colors ⇒ Object
39
40
41
# File 'lib/rake_compiler_dock/colors.rb', line 39

def disable_colors
  @colors_on = false
end
#enable_colors ⇒ Object
35
36
37
# File 'lib/rake_compiler_dock/colors.rb', line 35

def enable_colors
  @colors_on = true
end

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4