Class: Legion::Transport::InProcess::Consumer
- Inherits:
-
Object
- Object
- Legion::Transport::InProcess::Consumer
- Defined in:
- lib/legion/transport/in_process.rb
Instance Attribute Summary collapse
-
#consumer_tag ⇒ Object
readonly
Returns the value of attribute consumer_tag.
Instance Method Summary collapse
- #cancel ⇒ Object
- #cancelled? ⇒ Boolean
-
#initialize(_channel, _queue, consumer_tag, *_rest) ⇒ Consumer
constructor
A new instance of Consumer.
Constructor Details
#initialize(_channel, _queue, consumer_tag, *_rest) ⇒ Consumer
Returns a new instance of Consumer.
154 155 156 157 |
# File 'lib/legion/transport/in_process.rb', line 154 def initialize(_channel, _queue, consumer_tag, *_rest) @consumer_tag = consumer_tag @cancelled = false end |
Instance Attribute Details
#consumer_tag ⇒ Object (readonly)
Returns the value of attribute consumer_tag.
152 153 154 |
# File 'lib/legion/transport/in_process.rb', line 152 def consumer_tag @consumer_tag end |
Instance Method Details
#cancel ⇒ Object
159 160 161 |
# File 'lib/legion/transport/in_process.rb', line 159 def cancel @cancelled = true end |
#cancelled? ⇒ Boolean
163 164 165 |
# File 'lib/legion/transport/in_process.rb', line 163 def cancelled? @cancelled end |