Sha256: 4aca9487c9fb6f9f5fbdc0d243895c3c98e0d424dc21e9160eec5bd3d0d5d1d7
Contents?: true
Size: 667 Bytes
Versions: 1
Compression:
Stored size: 667 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.9 | lib/ppcurses/Screen.rb |