class
TermBuf::ResponseRegistry
- TermBuf::ResponseRegistry
- Reference
- Object
Overview
The patterns an application is currently waiting on.
Empty by default, which is the useful default: with nothing registered every escape sequence arriving from the terminal is something the person at the keyboard pressed.
Guarded, because the reader runs on a thread of its own when the terminal is a real device while registration happens wherever the application is.
Defined in:
termbuf/terminal/responses.crConstructors
Instance Method Summary
-
#clear : Nil
Stops expecting anything.
-
#empty? : Bool
Whether nothing is expected, in which case every sequence is input.
-
#matches?(sequence : String) : Bool
Whether sequence is one of the replies being waited for.
-
#register(prefix : String, terminator : String) : ResponsePattern
Starts expecting pattern.
-
#register(pattern : ResponsePattern) : ResponsePattern
Starts expecting pattern.
-
#size : Int32
How many patterns are registered.
-
#unregister(pattern : ResponsePattern) : Nil
Stops expecting pattern.
Constructor Detail
Instance Method Detail
Starts expecting pattern. Registering the same one twice is harmless.
Starts expecting pattern. Registering the same one twice is harmless.