Class: Tupelo::Client::NotifyWaiter
- Defined in:
- lib/tupelo/client/reader.rb
Overview
Instrumentation.
Instance Attribute Summary collapse
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
Instance Method Summary collapse
- #<<(event) ⇒ Object
-
#initialize(client) ⇒ NotifyWaiter
constructor
A new instance of NotifyWaiter.
- #inspect ⇒ Object
- #toggle ⇒ Object
- #wait ⇒ Object
Constructor Details
#initialize(client) ⇒ NotifyWaiter
Returns a new instance of NotifyWaiter.
119 120 121 122 |
# File 'lib/tupelo/client/reader.rb', line 119 def initialize client @client = client @queue = client.make_queue end |
Instance Attribute Details
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
117 118 119 |
# File 'lib/tupelo/client/reader.rb', line 117 def queue @queue end |
Instance Method Details
#<<(event) ⇒ Object
124 125 126 |
# File 'lib/tupelo/client/reader.rb', line 124 def << event queue << event end |
#inspect ⇒ Object
136 137 138 |
# File 'lib/tupelo/client/reader.rb', line 136 def inspect to_s end |
#toggle ⇒ Object
132 133 134 |
# File 'lib/tupelo/client/reader.rb', line 132 def toggle @client.worker << self end |
#wait ⇒ Object
128 129 130 |
# File 'lib/tupelo/client/reader.rb', line 128 def wait queue.pop end |