DRb::DRbObservable
module DRb::DRbObservable
包含的模块:可观察
Observable模块扩展为DRb。细节见Observable。
公共实例方法
notify_observers(*arg) Show source
通知观察者状态的变化。另请参阅Observable#notify_observers
# File lib/drb/observer.rb, line 10
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