Class: Concurrent::Actor::Utils::AdHoc — Concurrent Ruby

# Class: Concurrent::Actor::Utils::AdHoc

Inherits:
  Context
  - Object
  - AbstractContext
  - Context
  - Concurrent::Actor::Utils::AdHoc
  show all

Includes:
  AsAdHoc

Defined in:
  lib-edge/concurrent/actor/utils/ad_hoc.rb

## Overview

Allows quick creation of actors with behaviour defined by blocks.

Examples:

ping

    AdHoc.spawn :forward, an_actor do |where|
      # this block has to return proc defining #on_message behaviour
      -> message { where.tell message  }
    end

## Instance Method Summary collapse

- #initialize(*args, &initializer) ⇒ undocumented included from AsAdHoc
- #on_message(message) ⇒ undocumented included from AsAdHoc

## Instance Method Details

### #initialize(*args, &initializer) ⇒ `undocumented` Originally defined in module AsAdHoc

### #on_message(message) ⇒ `undocumented` Originally defined in module AsAdHoc