Class: Celluloid::Receiver
- Defined in:
- lib/vendor/celluloid/lib/celluloid/receivers.rb
Overview
Methods blocking on a call to receive
Instance Attribute Summary collapse
-
#timer ⇒ Object
Returns the value of attribute timer.
Instance Method Summary collapse
-
#initialize(block) ⇒ Receiver
constructor
A new instance of Receiver.
-
#match(message) ⇒ Object
Match a message with this receiver’s block.
- #resume(message = nil) ⇒ Object
Constructor Details
Instance Attribute Details
#timer ⇒ Object
Returns the value of attribute timer.
49 50 51 |
# File 'lib/vendor/celluloid/lib/celluloid/receivers.rb', line 49 def timer @timer end |
Instance Method Details
#match(message) ⇒ Object
Match a message with this receiver’s block
58 59 60 |
# File 'lib/vendor/celluloid/lib/celluloid/receivers.rb', line 58 def match() @block.call() if @block end |
#resume(message = nil) ⇒ Object
62 63 64 |
# File 'lib/vendor/celluloid/lib/celluloid/receivers.rb', line 62 def resume( = nil) @task.resume end |