class Tty
From homebrew (raw.github.com/mxcl/homebrew/go).
Public Class Methods
blue()
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 6 def blue; bold 34; end
em()
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 11 def em; underline 39; end
gray()
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 13 def gray; bold 30 end
green()
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 12 def green; color 92 end
red()
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 8 def red; underline 31; end
reset()
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 10 def reset; escape 0; end
white()
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 7 def white; bold 39; end
width()
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 15 def width `/usr/bin/tput cols`.strip.to_i end
yellow()
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 9 def yellow; underline 33 ; end
Private Class Methods
bold(n)
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 23 def bold n escape "1;#{n}" end
color(n)
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 20 def color n escape "0;#{n}" end
escape(n)
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 29 def escape n "\033[#{n}m" if $stdout.tty? end
underline(n)
click to toggle source
# File lib/git_bpf/lib/git-helpers.rb, line 26 def underline n escape "4;#{n}" end