35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/textbringer/face.rb', line 35
def update(foreground: -1, background: -1,
bold: false, underline: false, reverse: false)
@foreground = foreground
@background = background
@bold = bold
@underline = underline
@reverse = reverse
Curses.init_pair(@color_pair,
Color[foreground], Color[background])
@attributes = 0
@attributes |= Curses.color_pair(@color_pair)
@attributes |= Curses::A_BOLD if bold
@attributes |= Curses::A_UNDERLINE if underline
@attributes |= Curses::A_REVERSE if reverse
self
end
|