Module: HTML

Defined in:
lib/html/proofer.rb,
lib/html/proofer/checks.rb,
lib/html/proofer/version.rb,
lib/html/proofer/checkable.rb

Defined Under Namespace

Classes: Proofer

Class Method Summary collapse

Class Method Details

.colorize(color, string) ⇒ Object


19
20
21
22
23
24
25
# File 'lib/html/proofer.rb', line 19

def self.colorize(color, string)
  if $stdout.isatty && $stderr.isatty
    Colored.colorize(string, :foreground => color)
  else
    string
  end
end