Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/banners.rb

Overview

open up string class, enable terminal colors add some colors, windowing methods

Instance Method Summary collapse

Instance Method Details

#bluObject



11
# File 'lib/banners.rb', line 11

def blu()  colorize(34,0) end

#colorize(color, mod) ⇒ Object



5
6
7
# File 'lib/banners.rb', line 5

def colorize(color, mod)
  "\033[#{mod};#{color};49m#{self}\033[0;0m"
end

#grnObject



13
# File 'lib/banners.rb', line 13

def grn()  colorize(32,0) end

#redObject



14
# File 'lib/banners.rb', line 14

def red()  colorize(31,0) end

#resetObject



9
# File 'lib/banners.rb', line 9

def reset() colorize(0,0) end

#ugnObject



10
# File 'lib/banners.rb', line 10

def ugn()  colorize(32,4) end

#yelObject



12
# File 'lib/banners.rb', line 12

def yel()  colorize(33,0) end