Ruby Observable Functions
EditRocket provides the following information on Observable functions in the Ruby source code builder.
add_observer(observer) - Add observer as an observer on this object. observer will now receive notifications.
changed?() - Query the changed state of this object.
changed(state=true) - Set the changed state of this object. Notifications will be sent only if the changed state is true.
count_observers() - Return the number of observers associated with this object.
delete_observer(observer) - Delete observer as an observer on this object. It will no longer receive notifications.
delete_observers() - Delete all observers associated with this object.
notify_observers(*arg) - If this object's changed state is true, invoke the update method in each currently associated observer in turn, passing it the given arguments. The changed state is then set to false.