# frozen_string_literal: false
require 'observer'
module DRb
# The Observable module extended to DRb. See Observable for details.
module DRbObservable
include Observable
# Notifies observers of a change in state. See also
# Observable#notify_observers
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
end
end
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| acl.rb | File | 4.61 KB | 0644 |
|
| drb.rb | File | 57.49 KB | 0644 |
|
| eq.rb | File | 275 B | 0644 |
|
| extserv.rb | File | 836 B | 0644 |
|
| extservm.rb | File | 1.75 KB | 0644 |
|
| gw.rb | File | 3 KB | 0644 |
|
| invokemethod.rb | File | 777 B | 0644 |
|
| observer.rb | File | 671 B | 0644 |
|
| ssl.rb | File | 11.52 KB | 0644 |
|
| timeridconv.rb | File | 2.16 KB | 0644 |
|
| unix.rb | File | 2.78 KB | 0644 |
|
| version.rb | File | 35 B | 0644 |
|
| weakidconv.rb | File | 1.12 KB | 0644 |
|