Represents an AMQP Type
# File lib/types/type.rb, line 31 def self.[](code) try_convert(code) or raise IndexError, "unknown type code #{code}"; end
# File lib/types/type.rb, line 27 def initialize(code) @code = code; @@builtin[code] = self; end
# File lib/types/type.rb, line 30 def self.try_convert(code) code.is_a?(Type) ? code : @@builtin[code]; end
# File lib/types/type.rb, line 36 def <=>(x) @code <=> x; end
# File lib/types/type.rb, line 37 def hash() @code.hash; end
# File lib/types/type.rb, line 34 def name() Cproton.pn_type_name(@code); end