@return
# File lib/amq/protocol/client.rb, line 519 def self.decode(data) offset = 0 length = data[offset, 1].unpack(PACK_CHAR).first offset += 1 reason = data[offset, length] offset += length self.new(reason) end
@return
# File lib/amq/protocol/client.rb, line 539 def self.encode(reason) channel = 0 buffer = @packed_indexes.dup buffer << reason.to_s.bytesize.chr buffer << reason.to_s MethodFrame.new(buffer, channel) end
# File lib/amq/protocol/client.rb, line 533 def self.has_content? false end
# File lib/amq/protocol/client.rb, line 529 def initialize(reason) @reason = reason end