Class: AMQ::Protocol::Basic::CancelOk

Inherits:
Method
  • Object
show all
Defined in:
lib/amq/protocol/client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Method

encode_body, index, inherited, instantiate, method_id, methods, name, split_headers

Constructor Details

#initialize(consumer_tag) ⇒ CancelOk

Returns a new instance of CancelOk.



1772
1773
1774
# File 'lib/amq/protocol/client.rb', line 1772

def initialize(consumer_tag)
  @consumer_tag = consumer_tag
end

Instance Attribute Details

#consumer_tagObject (readonly)

Returns the value of attribute consumer_tag.



1771
1772
1773
# File 'lib/amq/protocol/client.rb', line 1771

def consumer_tag
  @consumer_tag
end

Class Method Details

.decode(data) ⇒ Object

Returns:



1762
1763
1764
1765
1766
1767
1768
1769
# File 'lib/amq/protocol/client.rb', line 1762

def self.decode(data)
  offset = offset = 0 # self-assigning offset to eliminate "assigned but unused variable" warning even if offset is not used in this method
  length = data[offset, 1].unpack(PACK_CHAR).first
  offset += 1
  consumer_tag = data[offset, length]
  offset += length
  self.new(consumer_tag)
end

.has_content?Boolean

Returns:

  • (Boolean)


1776
1777
1778
# File 'lib/amq/protocol/client.rb', line 1776

def self.has_content?
  false
end