Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Observable#notify_observers

notify_observers(*arg)

Notify observers of a change in state if this object’s changed state is true.

This will invoke the method named in add_observer, passing *arg. The changed state is then set to false.

*arg

Any arguments to pass to the observers.

See also #delete_observers #delete_observer also in 3.2 · 3.1 · 3.0