/usr/lib/ruby/vendor_ruby/celluloid/links.rb is in ruby-celluloid 0.16.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | module Celluloid
# Linked actors send each other system events
class Links
include Enumerable
def initialize
@links = {}
end
# Add an actor to the current links
def <<(actor)
@links[actor.mailbox.address] = actor
end
# Do links include the given actor?
def include?(actor)
@links.has_key? actor.mailbox.address
end
# Remove an actor from the links
def delete(actor)
@links.delete actor.mailbox.address
end
# Iterate through all links
def each
@links.each { |_, actor| yield(actor) }
end
# Generate a string representation
def inspect
links = self.map(&:inspect).join(',')
"#<#{self.class}[#{links}]>"
end
end
end
|