Sha256: 6f6959cddc57c16617007d5bbc7e067470d0122f7a25b432de6b1e1a20bd59f7

Contents?: true

Size: 186 Bytes

Versions: 4

Compression:

Stored size: 186 Bytes

Contents

module Fezzik
  COLORS = { :red => 1, :green => 2 }
  def self.color_string(string, color)
    return string unless STDOUT.isatty
    "\e[01;#{COLORS[color]+30}m#{string}\e[m"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fezzik-0.8.0.beta2 lib/fezzik/colors.rb
fezzik-0.8.0.beta1 lib/fezzik/colors.rb
fezzik-0.7.4 lib/fezzik/colors.rb
fezzik-0.7.3 lib/fezzik/colors.rb