evental
Evental
Evental is a Crystal shard to easily write event-driven code, using callbacks to handle events.
Installation
Add it to Projectfile
deps do
github "hugoabonizio/evental"
end
Usage
Example of a simple event handler:
require "evental"
emitter = Evental::Emitter.new
emitter.on :open do
puts "Fake connection opened!"
end
emitter.emit :open
# => Fake connection opened!
Contributing
- Fork it ( https://github.com/hugoabonizio/evental/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- hugoabonizio Hugo Abonizio - creator, maintainer
Repository
evental
Owner
Statistic
- 1
- 0
- 0
- 0
- 0
- over 8 years ago
- July 18, 2015
License
MIT License
Links
Synced at
Sun, 22 Dec 2024 16:51:45 GMT
Languages