Sha256: a5caf835bd982c7b9289e96b9f6592d965846dbc8f15bcc652abfa0983178e26

Contents?: true

Size: 153 Bytes

Versions: 1

Compression:

Stored size: 153 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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
credy-0.1.1 lib/credy/string.rb