class String

参考:gist.github.com/lnznt/2663516

Public Instance Methods

bg_black() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 35
def bg_black
  "\e[40m#{self}\e[m"
end
bg_blue() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 51
def bg_blue
  "\e[44m#{self}\e[m"
end
bg_cyan() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 59
def bg_cyan
  "\e[46m#{self}\e[m"
end
bg_green() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 43
def bg_green
  "\e[42m#{self}\e[m"
end
bg_magenta() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 55
def bg_magenta
  "\e[45m#{self}\e[m"
end
bg_red() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 39
def bg_red
  "\e[41m#{self}\e[m"
end
bg_white() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 63
def bg_white
  "\e[47m#{self}\e[m"
end
bg_yellow() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 47
def bg_yellow
  "\e[43m#{self}\e[m"
end
black() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 3
def black
  "\e[30m#{self}\e[m"
end
blue() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 19
def blue
  "\e[34m#{self}\e[m"
end
bold() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 67
def bold
  "\e[1m#{self}\e[m"
end
bright() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 71
def bright
  "\e[2m#{self}\e[m"
end
cyan() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 27
def cyan
  "\e[36m#{self}\e[m"
end
error_style() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 91
def error_style
  self.red
end
green() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 11
def green
  "\e[32m#{self}\e[m"
end
italic() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 75
def italic
  "\e[3m#{self}\e[m"
end
magenta() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 23
def magenta
  "\e[35m#{self}\e[m"
end
red() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 7
def red
  "\e[31m#{self}\e[m"
end
reverse_color() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 87
def reverse_color
  "\e[7m#{self}\e[m"
end
tips_style() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 99
def tips_style
  self.green
end
underline() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 79
def underline
  "\e[4m#{self}\e[m"
end
warning_style() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 95
def warning_style
  self.yellow
end
white() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 31
def white
  "\e[37m#{self}\e[m"
end
yellow() click to toggle source
# File lib/xcodeprojfiler/string_extensions.rb, line 15
def yellow
  "\e[33m#{self}\e[m"
end