def colorize(options = {})
options[:timeout] ||= self.class.timeout_threshold
options[:input] = @spec.inject([]) do |memo, (lexer, code)|
memo << lexer << SEPARATOR
if code.respond_to?(:read)
out = code.read
code.close
code = out
end
memo << code << SEPARATOR
end.join("")
child = Child.new(self.class.bin, options)
pieces = child.out.split(SEPARATOR).each do |code|
code.sub!(%r{</pre></div>\Z}, "</pre>\n</div>")
code.force_encoding('UTF-8') if code.respond_to?(:force_encoding)
end
@multi ? pieces : pieces.first
end