153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
# File 'lib/watobo/gui/chat_diff.rb', line 153
def normalizeData(data)
raise ArgumentError, "Bad data type. Need Request/Response." unless data.respond_to? :headers
dummy = []
begin
unless data..nil?
data..each do |h|
dummy.concat adjustLine(h)
end
dummy.push ""
end
unless data.body.nil?
body = data.body_encoded
body.split("\n").each do |l|
dummy.concat adjustLine(l)
end
end
rescue => bang
puts bang
dummy = data
end
return dummy
end
|