Takes an actor name and returns a new actor name which, when used as the target of a method call, will pass a future continuation. It immediately returns a Dramatis::Future object.
# File lib/dramatis.rb, line 67
67: def future name
68: interface( name ).future
69: end
Takes a dramatis proxy object and returns an object that can be used to operate directly on the proxy, rather than on the proxied object. Since dramatis objects like actor names and futures are proxy objects, normal method calls on them are directed to the proxied object. In order to perform operations on the proxies themselves, the interface method is used to get access to a non-proxy object. If the object passed is a Dramatis::Actor::Name, the result is a Dramatis::Actor::Name::Interface object. If the object passed is a Dramatis::Future, the result is a Dramatis::Future::Interface object.
# File lib/dramatis.rb, line 34
34: def interface object, *args, &block
35: interface = nil
36: begin
37: interface = object.class.const_get( :Interface )
38: rescue NameError => name_error
39: raise Dramatis::Error::Interface.new( "object is not a dramatis interfaceable object: " + object.class.to_s )
40: end
41: interface.new( object, *args, &block )
42: end
Takes an actor name and returns a new actor name which, when used as the target of a method call, will pass a null continuation. As a result, the call will not block or otherwise wait for a result. The result of such a call is always nil.
# File lib/dramatis.rb, line 54
54: def release name
55: interface( name ).continue nil
56: end