Class: Qpid::Proton::ArrayHeader

Inherits:
Object
  • Object
show all
Defined in:
lib/qpid_proton/array.rb

Overview

Holds the information for an AMQP Array compound type.

It holds the type for the array and the descriptor if the array is described.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, descriptor = nil) ⇒ ArrayHeader

Returns a new instance of ArrayHeader.



38
39
40
41
# File 'lib/qpid_proton/array.rb', line 38

def initialize(type, descriptor = nil)
  @type = type
  @descriptor = descriptor
end

Instance Attribute Details

#descriptorObject (readonly)

Returns the value of attribute descriptor.



36
37
38
# File 'lib/qpid_proton/array.rb', line 36

def descriptor
  @descriptor
end

#typeObject (readonly)

Returns the value of attribute type.



35
36
37
# File 'lib/qpid_proton/array.rb', line 35

def type
  @type
end

Instance Method Details

#==(that) ⇒ Object



48
49
50
# File 'lib/qpid_proton/array.rb', line 48

def ==(that)
  ((@type == that.type) && (@descriptor == that.descriptor))
end

#described?Boolean

Returns true if the array is described.

Returns:

  • (Boolean)


44
45
46
# File 'lib/qpid_proton/array.rb', line 44

def described?
  !@descriptor.nil?
end