Sha256: 9b078f79152587fe71d7f5a225cc38c58525ff748b74f69309ea5c5ca28f35df

Contents?: true

Size: 629 Bytes

Versions: 4

Compression:

Stored size: 629 Bytes

Contents

class String
  def black;          "\e[30m#{self}\e[0m" end
  def red;            "\e[31m#{self}\e[0m" end
  def green;          "\e[32m#{self}\e[0m" end
  def brown;          "\e[33m#{self}\e[0m" end
  def blue;           "\e[34m#{self}\e[0m" end
  def magenta;        "\e[35m#{self}\e[0m" end
  def cyan;           "\e[36m#{self}\e[0m" end
  def gray;           "\e[37m#{self}\e[0m" end

  def bold;           "\e[1m#{self}\e[22m" end
  def italic;         "\e[3m#{self}\e[23m" end
  def underline;      "\e[4m#{self}\e[24m" end
  def blink;          "\e[5m#{self}\e[25m" end
  def reverse_color;  "\e[7m#{self}\e[27m" end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ubcbooker-1.0.0 lib/ubcbooker/color.rb
ubcbooker-0.2.3 lib/ubcbooker/color.rb
ubcbooker-0.2.2 lib/ubcbooker/color.rb
ubcbooker-0.2.1 lib/ubcbooker/color.rb