class RubyLsp::MessageWriter
Writes JSON RPC messages to the given IO
def initialize(io)
def initialize(io) @io = io end
def write(message)
def write(message) message[:jsonrpc] = "2.0" json_message = message.to_json @io.write("Content-Length: #{json_message.bytesize}\r\n\r\n#{json_message}") @io.flush end