模組 DRb::DRbObservable

Observable 模組延伸至 DRb。有關詳細資訊,請參閱 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