module Celluloid::InstanceMethods
def __arity
def __arity method(:initialize).arity end
def bare_object
=> #
>> actor.bare_object
=> #
>> actor
Bare objects can be identified via #inspect output:
be shared with at least the actor thread. Tread carefully.
Celluloid would ordinarily provide you, and the object is guaranteed to
directly with the bare object foregoes any kind of thread safety that
only a limited set of use cases like runtime metaprogramming. Interacting
Obtain the bare Ruby object the actor is wrapping. This is useful for
def bare_object self end
def inspect
def inspect return "..." if Celluloid.detect_recursion str = "#<" str << if leaked? Celluloid::BARE_OBJECT_WARNING_MESSAGE else "Celluloid::Proxy::Cell" end str << "(#{self.class}:0x#{object_id.to_s(16)})" str << " " unless instance_variables.empty? instance_variables.each do |ivar| next if ivar == Celluloid::OWNER_IVAR str << "#{ivar}=#{instance_variable_get(ivar).inspect} " end str.sub!(/\s$/, ">") end
def leaked?
def leaked? @celluloid_owner != Thread.current[:celluloid_actor] end
def registered_name
def registered_name Actor.registered_name end
def tap
def tap yield current_actor current_actor end