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.
Source Code
# File observer.rb, line 181 def notify_observers(*arg) if defined? @observer_state and @observer_state if defined? @observer_peers for i in @observer_peers.dup i.update(*arg) end end @observer_state = false end end
<code/>and<pre/>for code samples.