Module: Plumbing::Actor::ClassMethods
- Defined in:
- lib/plumbing/actor.rb
Instance Method Summary collapse
-
#async(*names) ⇒ Object
Define the async messages that this actor can respond to.
-
#async_messages ⇒ Object
List the async messages that this actor can respond to.
- #inherited(subclass) ⇒ Object
-
#start ⇒ Object
Create a new actor instance and build a proxy for it using the current mode.
Instance Method Details
#async(*names) ⇒ Object
Define the async messages that this actor can respond to
31 |
# File 'lib/plumbing/actor.rb', line 31 def async(*names) = .concat(names.map(&:to_sym)) |
#async_messages ⇒ Object
List the async messages that this actor can respond to
34 |
# File 'lib/plumbing/actor.rb', line 34 def = @async_messages ||= [] |
#inherited(subclass) ⇒ Object
36 37 38 |
# File 'lib/plumbing/actor.rb', line 36 def inherited subclass subclass..concat end |
#start ⇒ Object
Create a new actor instance and build a proxy for it using the current mode
22 23 24 25 26 27 |
# File 'lib/plumbing/actor.rb', line 22 def start(...) instance = new(...) build_proxy_for(instance).tap do |proxy| instance.send :"proxy=", proxy end end |