Class: Actor::Messaging::Reader
- Inherits:
-
Object
- Object
- Actor::Messaging::Reader
- Defined in:
- lib/actor/messaging/reader.rb,
lib/actor/messaging/reader/substitute.rb
Defined Under Namespace
Classes: Substitute
Instance Attribute Summary collapse
-
#queue_reader ⇒ Object
readonly
Returns the value of attribute queue_reader.
Class Method Summary collapse
Instance Method Summary collapse
- #call(wait: nil) ⇒ Object
-
#initialize(queue_reader) ⇒ Reader
constructor
A new instance of Reader.
- #stop ⇒ Object
- #stopped? ⇒ Boolean
Constructor Details
#initialize(queue_reader) ⇒ Reader
Returns a new instance of Reader.
6 7 8 |
# File 'lib/actor/messaging/reader.rb', line 6 def initialize queue_reader @queue_reader = queue_reader end |
Instance Attribute Details
#queue_reader ⇒ Object (readonly)
Returns the value of attribute queue_reader.
4 5 6 |
# File 'lib/actor/messaging/reader.rb', line 4 def queue_reader @queue_reader end |
Class Method Details
Instance Method Details
#call(wait: nil) ⇒ Object
18 19 20 |
# File 'lib/actor/messaging/reader.rb', line 18 def call wait: nil queue_reader.read wait: wait end |
#stop ⇒ Object
22 23 24 |
# File 'lib/actor/messaging/reader.rb', line 22 def stop queue_reader.stop end |
#stopped? ⇒ Boolean
26 27 28 |
# File 'lib/actor/messaging/reader.rb', line 26 def stopped? queue_reader.stopped? end |