Class: Aggro::ConcurrentActor
- Inherits:
-
Concurrent::Actor::RestartingContext
- Object
- Concurrent::Actor::RestartingContext
- Aggro::ConcurrentActor
- Defined in:
- lib/aggro/concurrent_actor.rb
Overview
Private: Wraps a given target in an concurrent actor.
Instance Method Summary collapse
-
#initialize(target) ⇒ ConcurrentActor
constructor
A new instance of ConcurrentActor.
- #on_message(message) ⇒ Object
Constructor Details
#initialize(target) ⇒ ConcurrentActor
Returns a new instance of ConcurrentActor.
4 5 6 |
# File 'lib/aggro/concurrent_actor.rb', line 4 def initialize(target) @target = target end |
Instance Method Details
#on_message(message) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/aggro/concurrent_actor.rb', line 8 def () if command? @target.send :apply_command, elsif query? @target.send :run_query, end end |