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.



1994
1995
1996
# File 'lib/amq/protocol/client.rb', line 1994

def initialize(cluster_id)
  @cluster_id = cluster_id
end

Instance Attribute Details

#cluster_idObject (readonly)

Returns the value of attribute cluster_id.



1993
1994
1995
# File 'lib/amq/protocol/client.rb', line 1993

def cluster_id
  @cluster_id
end

Class Method Details

.decode(data) ⇒ Object

Returns:



1984
1985
1986
1987
1988
1989
1990
1991
# File 'lib/amq/protocol/client.rb', line 1984

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
  cluster_id = data[offset, length]
  offset += length
  self.new(cluster_id)
end

.has_content?Boolean

Returns:

  • (Boolean)


1998
1999
2000
# File 'lib/amq/protocol/client.rb', line 1998

def self.has_content?
  false
end