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.
# File lib/observer.rb, line 193
def notify_observers(*arg)
if defined? @observer_state and @observer_state
if defined? @observer_peers
@observer_peers.each do |k, v|
k.send v, *arg
end
end
@observer_state = false
end
end