# File lib/stomp/codec.rb, line 18 def self.encode(in_string = nil) return in_string unless in_string ev = Stomp::ENCODE_VALUES # avoid typing below os = in_string + "" 0.step(ev.length-2,2) do |i| os.gsub!(ev[i], ev[i+1]) end os end