Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/kuzya/core_ext/string/formatting.rb

Instance Method Summary collapse

Instance Method Details

#boldObject



4
5
6
# File 'lib/kuzya/core_ext/string/formatting.rb', line 4

def bold
  "\e[1m#{self}\e[22m"
end

#italicObject



8
9
10
# File 'lib/kuzya/core_ext/string/formatting.rb', line 8

def italic
  "\e[3m#{self}\e[23m"
end

#redObject



12
13
14
# File 'lib/kuzya/core_ext/string/formatting.rb', line 12

def red
  "\e[31m#{self}\e[0m"
end