class Celluloid::Internals::Handler

Methods blocking on a call to receive

Public Class Methods

new(pattern, block) click to toggle source
# File lib/celluloid/internals/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/internals/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/internals/handlers.rb, line 33
def match(message)
  @pattern === message
end