lib/ppcurses/actions/GetIntegerAction.rb in ppcurses-0.0.24 vs lib/ppcurses/actions/GetIntegerAction.rb in ppcurses-0.0.25

- old
+ new

@@ -4,20 +4,20 @@ module PPCurses class GetIntegerAction < PromptAction def execute - y = @win.cury() + y = @win.cury @data = '' - begin - @win.setpos(y,x_padding()) - @win.clrtoeol() + begin + @win.setpos(y, x_padding) + @win.clrtoeol @win.box('|', '-') @win.addstr(@prompt) echo - @data = @win.getstr() + @data = @win.getstr noecho - end while not @data =~ /^\d+$/ + end until @data =~ /^\d+$/ end end end