kevinrutherford / event_bus Goto Github PK
View Code? Open in Web Editor NEWA simple pubsub event bus
A simple pubsub event bus
master
contains some useful things (e.g. EventBus.with_temporary_subscriber
) that I'd like in a release. Would it be possible to ship 1.1.0
?
For thread-safety and/or usage of multiple busses, it would be nice to be able to instantiate the EventBus
class.
Something like this:
bus = EventBus.new
bus.subscribe(:event, &block)
It could be backwards compatible with the class methods that exists now using a default instance of EventBus
.
Is this something you would consider a good thing?
In that case I will be happy to implement :)
Allow subscribers to omit the method name and match it to the event name on event dispatch.
Subscribers who are listening via a regex may need to know which event in particular was triggered. So we need to add the event name to the details hash.
I can't find the repository of https://rubygems.org/gems/event_bg_bus.
... which probably means ditching the use of rspec-given.
There are currently no tests to cover that case.
Let subscribers pass a block as an alternative to object+method.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.