class Celluloid::Method - celluloid-0.15.2 Documentation

# class Celluloid::Method

Method handles that route through an actor proxy

### Public Class Methods

new(proxy, name) click to toggle source

    # File lib/celluloid/method.rb, line 5
    def initialize(proxy, name)
      raise NameError, "undefined method `#{name}'" unless proxy.respond_to? name

      @proxy, @name = proxy, name
      @klass = @proxy.class
    end

### Public Instance Methods

arity() click to toggle source

    # File lib/celluloid/method.rb, line 12
    def arity
      @proxy.method_missing(:method, @name).arity
    end

call(*args, &block) click to toggle source

    # File lib/celluloid/method.rb, line 16
    def call(*args, &block)
      @proxy.__send__(@name, *args, &block)
    end

inspect() click to toggle source

    # File lib/celluloid/method.rb, line 20
    def inspect
      "#<Celluloid::Method #{@klass}##{@name}>"
    end