Class: Qwirk::Adapter::Inline::Publisher::MyResponseHandle
- Inherits:
-
Object
- Object
- Qwirk::Adapter::Inline::Publisher::MyResponseHandle
- Defined in:
- lib/qwirk/adapter/inline/publisher.rb
Instance Method Summary collapse
- #add(original_message_id, response_message, worker_name) ⇒ Object
-
#initialize ⇒ MyResponseHandle
constructor
A new instance of MyResponseHandle.
-
#timeout_read(timeout) ⇒ Object
We’re inline so we either have a response or not (not is interpreted as a timeout).
Constructor Details
#initialize ⇒ MyResponseHandle
Returns a new instance of MyResponseHandle.
7 8 9 |
# File 'lib/qwirk/adapter/inline/publisher.rb', line 7 def initialize @responses = [] end |
Instance Method Details
#add(original_message_id, response_message, worker_name) ⇒ Object
11 12 13 |
# File 'lib/qwirk/adapter/inline/publisher.rb', line 11 def add(, , worker_name) @responses << [, , worker_name] end |
#timeout_read(timeout) ⇒ Object
We’re inline so we either have a response or not (not is interpreted as a timeout)
16 17 18 |
# File 'lib/qwirk/adapter/inline/publisher.rb', line 16 def timeout_read(timeout) @responses.pop end |