Class List Method List File List

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

Inherits:
  Context
  - Object
  - AbstractContext
  - Context
  - Concurrent::Actor::Utils::AdHoc
  show all
Includes:
  AsAdHoc
Defined in:
  lib/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 Attribute Summary (collapse)

- - (undocumented) core inherited from AbstractContext readonly

## Instance Method Summary (collapse)

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

## Instance Attribute Details

### - (`undocumented`) core (readonly) Originally defined in class AbstractContext

## Instance Method Details

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

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