Method: CDK::CDKOBJS#setExitType
- Defined in:
- lib/cdk/cdk_objs.rb
#setExitType(ch) ⇒ Object
Set the object’s exit-type based on the input. The .exitType field should have been part of the CDKOBJS struct, but it is used too pervasively in older applications to move (yet).
247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/cdk/cdk_objs.rb', line 247 def setExitType(ch) case ch when Ncurses::ERR @exit_type = :ERROR when CDK::KEY_ESC @exit_type = :ESCAPE_HIT when CDK::KEY_TAB, Ncurses::KEY_ENTER, CDK::KEY_RETURN @exit_type = :NORMAL when 0 @exit_type = :EARLY_EXIT end end |