# File lib/stomp_server/stomp_frame.rb, line 22 def dest #@dest || (@dest = @headers['destination']) @headers['destination'] end
# File lib/stomp_server/stomp_frame.rb, line 11 def to_s result = @command + "\n" @headers['content-length'] = @body.size.to_s if @body.include?(0) @headers.each_pair do |key, value| result << "#{key}:#{value}\n" end result << "\n" result << @body.to_s result << "\0000\n" end
# File lib/stomp_server/stomp_frame.rb, line 5 def initialize(command=nil, headers=nil, body=nil) @command = command @headers = headers || {} @body = body || '' end