Project status: [ ] Being developed [ ] Usable [ ] Functionally complete
Current code causes a bug: https://github.com/crystal-lang/crystal/issues/6158
Cuter is an "overlay" for Papierkorb's cute which modifies some of its built-in behavior. Specifically, it changes or adds the following:
- Blocks return Bool instead of nil
- Signals know their @parent object which has them
- Signals support one-time trigger via @listeners1 and once() instead of on()
- Every emit() also emits signal "event"
- Every on() emits signal new_listener unless new_listener itself is added
- Every off() emits signal remove_listener
- Emit() and emit2() mimick _emit() and emit() from Blessed
And some other changes are included or are coming up.
In essence, this is a specialized module aiming to duplicate Blessed's event model, and is probably not usable outside of it, due to specific and contextualized behavior.