Class: Concurrent::Actor::Utils::AdHoc
- Inherits:
-
Context
- Object
- AbstractContext
- Context
- Concurrent::Actor::Utils::AdHoc
- Defined in:
- lib/concurrent/actor/utils/ad_hoc.rb
Overview
Allows quick creation of actors with behaviour defined by blocks.
Instance Attribute Summary
Attributes inherited from AbstractContext
Instance Method Summary collapse
-
#initialize(*args, &initializer) ⇒ AdHoc
constructor
A new instance of AdHoc.
- #on_message(message) ⇒ Object
Methods inherited from Context
Methods inherited from AbstractContext
#ask, #behaviour_definition, #dead_letter_routing, #default_reference_class, #envelope, #on_envelope, #on_event, #pass, #tell
Methods included from InternalDelegations
#behaviour, #behaviour!, #children, #context, #dead_letter_routing, #log, #redirect, #terminate!
Methods included from PublicDelegations
#context_class, #executor, #name, #parent, #path, #reference
Methods included from TypeCheck
#Child!, #Child?, #Match!, #Match?, #Type!, #Type?
Constructor Details
#initialize(*args, &initializer) ⇒ AdHoc
Returns a new instance of AdHoc.
11 12 13 |
# File 'lib/concurrent/actor/utils/ad_hoc.rb', line 11 def initialize(*args, &initializer) = Type! initializer.call(*args), Proc end |
Instance Method Details
#on_message(message) ⇒ Object
15 16 17 |
# File 'lib/concurrent/actor/utils/ad_hoc.rb', line 15 def () instance_exec , & end |