Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. 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.3 · 3.2 · 3.0