class Celluloid::Handler - celluloid-0.16.0 Documentation

# class Celluloid::Handler

Methods blocking on a call to receive

### Public Class Methods

new(pattern, block) click to toggle source

    # File lib/celluloid/handlers.rb, line 27
    def initialize(pattern, block)
      @pattern = pattern
      @block = block
    end

### Public Instance Methods

call(message) click to toggle source

    # File lib/celluloid/handlers.rb, line 37
    def call(message)
      @block.call message
    end

match(message) click to toggle source

Match a message with this receiver's block

    # File lib/celluloid/handlers.rb, line 33
    def match(message)
      @pattern === message
    end