Module: Helper::Curses
- Defined in:
- lib/helpers/curses.rb
Constant Summary collapse
- ORANGE_COLOR =
20- RUBINE_COLOR =
10- LIGHT_GRAY_COLOR =
91- DARK_GRAY_COLOR =
92- BLUE =
30- RED =
70- CYAN =
40- GREEN =
50- MAGENTA =
60- YELLOW =
80- WHITE =
90- ORANGE =
20- RUBINE =
10- LIGHT_GRAY =
91- DARK_GRAY =
92
Instance Method Summary collapse
Instance Method Details
#attrib(*attributes) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/helpers/curses.rb', line 38 def attrib *attributes attributes.each do |attribute| Curses.attron attribute end yield attributes.each do |attribute| Curses.attroff attribute end end |
#h_center_text(text) ⇒ Object
52 53 54 |
# File 'lib/helpers/curses.rb', line 52 def h_center_text text (Curses.cols / 2) - (text.length / 2) end |
#v_center_text(text) ⇒ Object
48 49 50 |
# File 'lib/helpers/curses.rb', line 48 def v_center_text text Curses.lines / 2 end |