Class: Legion::Transport::InProcess::Consumer

Inherits:
Object
  • Object
show all
Defined in:
lib/legion/transport/in_process.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_tagObject (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

#cancelObject



159
160
161
# File 'lib/legion/transport/in_process.rb', line 159

def cancel
  @cancelled = true
end

#cancelled?Boolean

Returns:

  • (Boolean)


163
164
165
# File 'lib/legion/transport/in_process.rb', line 163

def cancelled?
  @cancelled
end