0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Because I really wanted something similar to Django's Signal in Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Django Signal

Because I really wanted something similar to Django's Signal in Ruby.

The Observable module was almost, but not entirely, not over engineered.

  • It made me have an object as the observer, not just a generic callable.
  • It's not a self standing class. It has to be included by someone.
  • Solution is not obvious if an object has various observable concerns.
  • add_observer had everything to cause me reload problems.

But, will this work as I expect?

First of all, I obviously didn't wire this signals to ActiveRecord.

Also, I took the liberty to make some adaptations. Namely:

  • No explicit weakref stuff. Want a weakref? Build if yourself. Invalid refs are handled gracefuly. Check the tests.
  • No providing_args, since they had no functional relevance.

Installation

Just add it to your projects' Gemfile:

gem "django_signal"

Usage

https://docs.djangoproject.com/en/dev/topics/signals/#defining-and-sending-signals

Credits


Copyright © 2012 Paulo Köch, released under the MIT license