模块 DRb::DRbObservable

扩展到 DRbObservable 模块。有关详细信息,请参阅 Observable

公共实例方法

notify_observers(*arg) 单击以切换源

通知观察者状态发生变化。另请参阅 Observable#notify_observers

# File lib/drb/observer.rb, line 11
def notify_observers(*arg)
  if defined? @observer_state and @observer_state
    if defined? @observer_peers
      @observer_peers.each do |observer, method|
        begin
          observer.__send__(method, *arg)
        rescue
          delete_observer(observer)
        end
      end
    end
    @observer_state = false
  end
end