Sha256: 7ee2142e03e53e4cf22718b1b6068a51b9f5882095005a3b961d09ecb700c19a
Contents?: true
Size: 666 Bytes
Versions: 1
Compression:
Stored size: 666 Bytes
Contents
require 'curses' include Curses module PPCurses # Screen initializes the Curses screen # Pass a code block to the run method to start things class Screen # Creates a curses session # # Example: # >> myScreen.run { displayMenu() } # def run( ) begin init_screen Curses.raw clear curs_set(0) # Makes cursor invisible noecho cbreak start_color yield rescue SystemExit, Interrupt # Empty Catch block so ruby doesn't puke out # a stack trace when CTRL-C is used ensure close_screen end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ppcurses-0.0.21 | lib/ppcurses/Screen.rb |