Sha256: 960c01aaaefc039d735e0a0acd1838eda154da009b7af61650ec3bd66ca795c7

Contents?: true

Size: 228 Bytes

Versions: 6

Compression:

Stored size: 228 Bytes

Contents

class String
  def colorize(color_code)
    "\e[#{color_code}m#{self}\e[0m"
  end

  def red
    colorize(31)
  end

  def green
    colorize(32)
  end

  def yellow
    colorize(33)
  end

  def blue
    colorize(34)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
em-midori-0.0.9.2 lib/em-midori/string.rb
em-midori-0.0.9.1 lib/em-midori/string.rb
em-midori-0.0.9 lib/em-midori/string.rb
em-midori-0.0.8 lib/em-midori/string.rb
em-midori-0.0.7.1 lib/em-midori/string.rb
em-midori-0.0.7 lib/em-midori/string.rb