Class: Curses::Window
Instance Method Summary collapse
-
#add_formatted_string(string) ⇒ Object
Adds a FormattedString.
-
#cursor ⇒ Object
Returns cursor y and x coordinates.
Instance Method Details
#add_formatted_string(string) ⇒ Object
Adds a FormattedString
9 10 11 12 13 14 15 16 17 |
# File 'lib/salticid/interface/ncurses.rb', line 9 def add_formatted_string(string) string.each do |part| # Set attributes part[1..-1].each {| attribute| attron attribute } addstr part[0] # Unset attributes part[1..-1].each {| attribute| attroff attribute } end end |
#cursor ⇒ Object
Returns cursor y and x coordinates.
20 21 22 |
# File 'lib/salticid/interface/ncurses.rb', line 20 def cursor [cury, curx] end |