Sha256: fb77612328fe2d0d13815a6abf4430301efbd8cef8e378ffddf53027a66ed3c4

Contents?: true

Size: 353 Bytes

Versions: 55

Compression:

Stored size: 353 Bytes

Contents

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

  def bold
    "\e[1m#{self}\e[0m"
  end 
  
  def white
    colorize(37)
  end 

  def green
    colorize(32)
  end 

  def yellow
    colorize(33)
  end 

  def red 
    colorize(31)
  end 

  def blue
    colorize(34)
  end 

  def grey
    colorize("90")
  end
end

Version data entries

55 entries across 55 versions & 2 rubygems

Version Path
dply-0.3.15 lib/dply/ext/string.rb
dply-0.3.14 lib/dply/ext/string.rb
dply-0.3.13 lib/dply/ext/string.rb
dply-0.3.12 lib/dply/ext/string.rb
dply-0.3.11 lib/dply/ext/string.rb
dply-0.3.10 lib/dply/ext/string.rb
dply-0.3.9 lib/dply/ext/string.rb
dply-0.3.8 lib/dply/ext/string.rb
dply-0.3.7 lib/dply/ext/string.rb
dply-0.3.6 lib/dply/ext/string.rb
dply-0.3.5 lib/dply/ext/string.rb
dply-0.3.4 lib/dply/ext/string.rb
dply-0.3.3 lib/dply/ext/string.rb
dply-0.3.2 lib/dply/ext/string.rb
dply-0.3.1 lib/dply/ext/string.rb
dply-0.3.0 lib/dply/ext/string.rb
deploy_dply-0.2.12 lib/deploy_dply/ext/string.rb
dply-0.2.19 lib/dply/ext/string.rb
dply-0.2.18 lib/dply/ext/string.rb
dply-0.2.17 lib/dply/ext/string.rb