https://github.com/docelic/cuter
Papierkorb's "cute" (event-centric publish/subscribe model) with additions
https://github.com/docelic/cuter
Last synced: about 1 year ago
JSON representation
Papierkorb's "cute" (event-centric publish/subscribe model) with additions
- Host: GitHub
- URL: https://github.com/docelic/cuter
- Owner: docelic
- License: mit
- Created: 2018-06-02T19:26:26.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-17T11:43:38.000Z (almost 8 years ago)
- Last Synced: 2025-02-05T21:33:25.895Z (over 1 year ago)
- Language: Crystal
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Build status**: [](https://travis-ci.com/crystallabs/cuter)
[](https://github.com/crystallabs/cuter/releases/latest)
[](https://github.com/crystallabs/cuter/blob/master/LICENSE)
**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](https://github.com/Papierkorb/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](https://github.com/chjj/blessed)'s event model, and is probably not usable outside of it, due to specific and contextualized behavior.