TinyHooks has been released
I just released a TinyHooks, a helper library to easily define hooks for your classes and modules. If you’re a gem author, please try it out or read the code (only 64 lines!) and give some feedback!
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
I just released a TinyHooks, a helper library to easily define hooks for your classes and modules. If you’re a gem author, please try it out or read the code (only 64 lines!) and give some feedback!
Comments
Is this like an alternative to ActiveSupport callbacks?
TinyHooksis similar toActuveSupport::Callbacks, but there are a few major differences.TinyHooksdoesn’t support halting, but will support in the future.ActiveSupport::Callbackshas a set of methods for callbacks to work,TinyHookshas only one method.TinyHooks, while you need to change methods to callrun_callbacksmethod within them to apply callbacks withActiveSupport::Callbacks.Post a comment