Sha256: aecbfb8151e0eec3fc097c1ad0f3bbb80421570e18a320aa288e50bb83641d68
Contents?: true
Size: 409 Bytes
Versions: 2
Compression:
Stored size: 409 Bytes
Contents
require_relative 'PromptAction.rb' #noinspection RubyResolve module PPCurses class GetIntegerAction < PromptAction def execute y = @win.cury @data = '' begin @win.setpos(y, x_padding) @win.clrtoeol @win.box('|', '-') @win.addstr(@prompt) Curses.echo @data = @win.getstr Curses.noecho end until @data =~ /^\d+$/ end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ppcurses-0.1.1 | lib/ppcurses/actions/GetIntegerAction.rb |
ppcurses-0.1.0 | lib/ppcurses/actions/GetIntegerAction.rb |