Sha256: d12456ea2694acc87a11f7e6e8adbb7863280164522cb99a893fa2582f393953
Contents?: true
Size: 755 Bytes
Versions: 2
Compression:
Stored size: 755 Bytes
Contents
module Celluloid module Internals # Method handles that route through an actor proxy class Method def initialize(proxy, name) raise NoMethodError, "undefined method `#{name}'" unless proxy.respond_to? name @proxy = proxy @name = name @klass = @proxy.class end def arity @proxy.method_missing(:method, @name).arity end def name @proxy.method_missing(:method, @name).name end def parameters @proxy.method_missing(:method, @name).parameters end def call(*args, &block) @proxy.__send__(@name, *args, &block) end def inspect "#<Celluloid::Internals::Method #{@klass}##{@name}>" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
celluloid-0.18.0 | lib/celluloid/internals/method.rb |
celluloid-0.18.0.pre2 | lib/celluloid/internals/method.rb |