Class: AMQ::Protocol::Basic::GetEmpty

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(cluster_id) ⇒ GetEmpty

Returns a new instance of GetEmpty.



1921
1922
1923
# File 'lib/amq/protocol/client.rb', line 1921

def initialize(cluster_id)
  @cluster_id = cluster_id
end

Instance Attribute Details

#cluster_idObject (readonly)

Returns the value of attribute cluster_id.



1920
1921
1922
# File 'lib/amq/protocol/client.rb', line 1920

def cluster_id
  @cluster_id
end

Class Method Details

.decode(data) ⇒ Object

Returns:



1911
1912
1913
1914
1915
1916
1917
1918
# File 'lib/amq/protocol/client.rb', line 1911

def self.decode(data)
  offset = 0
  length = data[offset, 1].unpack(PACK_CHAR).first
  offset += 1
  cluster_id = data[offset, length]
  offset += length
  self.new(cluster_id)
end

.has_content?Boolean

Returns:

  • (Boolean)


1925
1926
1927
# File 'lib/amq/protocol/client.rb', line 1925

def self.has_content?
  false
end