> I had used similar extention to Obserbable.  Because my implementation
> was just to fill the needs at hand, I did not even bother to modify
> observer.rb, though.  I just added following 7 lines of code in my
> app.
>
> module Observable
>   def add_callback(callback)
>     @observer_peers = [] unless defined? @observer_peers
>     callback.instance_eval %{alias update call}
>     @observer_peers.push callback
>   end
> end
>
> Then an Observer looks like...
>
> class TwoHeadedObserver
>   def initialize(foo, bar)
>     @foo, @bar = foo, bar
>     @foo.add_callback(method :look_at_foo)
>     @bar.add_callback(method :look_at_bar)
>   end
>
>   ....
> end
>
> Main difference to your version (beside the interfacce) is that it
> holds references to methodd ojbects rather than generating them for
> each 'update' call.  You may also concider this because it is more
> efficient (unless you have specific needs to redefine the call back
> method at runtime...).
>
> Regards,
> Kenichi, Komiya.

Very nice solution!  This allows customized updates or as you say
TwoHeadedObserver.  This approach could still support
"constrainedProperties"
by have the callback return false to veto.  One problem with the veto
however
is that every callback must support this.

John