Class: GorgonAMQ::Protocol::Basic::ConsumeOk

Inherits:
Method
  • Object
show all
Defined in:
lib/gorgon_amq-protocol/lib/gorgon_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) ⇒ ConsumeOk

Returns a new instance of ConsumeOk.



1627
1628
1629
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1627

def initialize(consumer_tag)
  @consumer_tag = consumer_tag
end

Instance Attribute Details

#consumer_tagObject (readonly)

Returns the value of attribute consumer_tag.



1626
1627
1628
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1626

def consumer_tag
  @consumer_tag
end

Class Method Details

.decode(data) ⇒ Object

Returns:



1617
1618
1619
1620
1621
1622
1623
1624
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1617

def self.decode(data)
  offset = 0
  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)


1631
1632
1633
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1631

def self.has_content?
  false
end