Class: Mutant::Actor::Binding
- Inherits:
-
Object
- Object
- Mutant::Actor::Binding
- Defined in:
- lib/mutant/actor.rb
Overview
Bindin to others actors sender for simple RPC
Instance Method Summary collapse
-
#call(type) ⇒ Object
private
Send message and wait for reply.
Instance Method Details
#call(type) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Send message and wait for reply
55 56 57 58 59 60 |
# File 'lib/mutant/actor.rb', line 55 def call(type) other.call(Message.new(type, actor.sender)) = actor.receiver.call fail ProtocolError, "Expected #{type} but got #{.type}" unless type.equal?(.type) .payload end |