method

add_observer

v1_9_3_125 - Show latest stable - Class: Observable
add_observer(observer, func=:update)
public

Add observer as an observer on this object. so that it will receive notifications.

observer

the object that will be notified of changes.

func

Symbol naming the method that will be called when this Observable

has changes.

This method must return true for +observer.respond_to?+ and will
receive <tt>*arg</tt> when #notify_observers is called, where
<tt>*arg</tt> is the value passed to #notify_observers by this
Observable