Class: View::Base

Inherits:
Object show all
Defined in:
lib/view/base.rb

Direct Known Subclasses

Help, WelcomeUser, WorkingSet

Instance Method Summary collapse

Instance Method Details

#stdscrObject



3
4
5
# File 'lib/view/base.rb', line 3

def stdscr
  Ncurses.stdscr
end

#with_color(window, name) ⇒ Object



7
8
9
10
11
# File 'lib/view/base.rb', line 7

def with_color(window, name)
  window.attron Ncurses.COLOR_PAIR(Colors[name][:number])
  yield if block_given?
  window.attroff Ncurses.COLOR_PAIR(Colors[name][:number])
end