Sha256: 21b0a5e1a71b657cf88dc5662065b188c726da07a8a65346cf470ae39daae20e

Contents?: true

Size: 322 Bytes

Versions: 6

Compression:

Stored size: 322 Bytes

Contents

class String

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

  def bold()   colorize('1') ; end
  def invert() colorize('7') ; end

  def red()   colorize('31') ; end
  def blue()  colorize('34') ; end
  def green() colorize('32') ; end

  def undent() gsub(/^.{#{slice(/^ +/).length}}/, '') ; end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
git-multi-1.0.5 lib/ext/string.rb
git-multi-1.0.4 lib/ext/string.rb
git-multi-1.0.3 lib/ext/string.rb
git-multi-1.0.2 lib/ext/string.rb
git-multi-1.0.1 lib/ext/string.rb
git-multi-1.0.0 lib/ext/string.rb