public Method

Observable.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.

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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.