Releases: serradura/u-observers
Releases · serradura/u-observers
v2.3.0
v2.2.0
Features
- Add new option
perform_once: true
intoobservers.attach()
to define an observer that will execute only once. #8 - Add new method
observers.once()
to define callables that will execute only once. #8 - Add new method
observers.off()
to remove observers' objects or to remove callables by their event names. #8
Improvement
- Allow defining multiple callables to the same event when their values are different. #9
v2.1.0
v2.0.0
- Added
Micro::Observers::Event
- Pass
Micro::Observers::Event
when the observer's method receives two arguments. - Pass
Micro::Observers::Event
to the callable observers. - Allow sending additional data when notifying the observers. e.g.
notify(:event, data: :something)
,call(data: :something)