getmultiline()
private
Receive a section of lines until the response code’s match.
Show source
def getmultiline
lines = []
lines << getline
code = lines.last.slice(/\A([0-9a-zA-Z]{3})-/, 1)
if code
delimiter = code + " "
begin
lines << getline
end until lines.last.start_with?(delimiter)
end
return lines.join("\n") + "\n"
end