Sha256: a9c1d68dd284350929fdbeabc5889e87965261a4394351d4d9dc50bdc347b5db

Contents?: true

Size: 395 Bytes

Versions: 1

Compression:

Stored size: 395 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)
       echo
       @data = @win.getstr
       noecho
     end until @data =~ /^\d+$/
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ppcurses-0.0.25 lib/ppcurses/actions/GetIntegerAction.rb