Class: Qpid::Proton::Types::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/types/type.rb

Overview

Represents an AMQP Type

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#code (readonly)



33
34
35
# File 'lib/types/type.rb', line 33

def code
  @code
end

Class Method Details

.[](code)



31
# File 'lib/types/type.rb', line 31

def self.[](code) try_convert(code) or raise IndexError, "unknown type code #{code}"; end

.try_convert(code)



30
# File 'lib/types/type.rb', line 30

def self.try_convert(code) code.is_a?(Type) ? code : @@builtin[code]; end

Instance Method Details

#<=>(x)



36
# File 'lib/types/type.rb', line 36

def <=>(x) @code <=> x; end

#hash



37
# File 'lib/types/type.rb', line 37

def hash() @code.hash; end

#name Also known as: to_s



34
# File 'lib/types/type.rb', line 34

def name() Cproton.pn_type_name(@code); end