Class: Celluloid::Receiver
- Inherits:
-
Object
- Object
- Celluloid::Receiver
- Defined in:
- 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.
53 54 55 |
# File 'lib/celluloid/receivers.rb', line 53 def timer @timer end |
Instance Method Details
#match(message) ⇒ Object
Match a message with this receiver’s block
62 63 64 |
# File 'lib/celluloid/receivers.rb', line 62 def match() @block ? @block.call() : true end |
#resume(message = nil) ⇒ Object
66 67 68 |
# File 'lib/celluloid/receivers.rb', line 66 def resume( = nil) @task.resume end |