class TypeProf::LSP::Writer
Public Class Methods
new(io)
click to toggle source
# File typeprof-0.21.2/lib/typeprof/lsp.rb, line 797 def initialize(io) @io = io end
Public Instance Methods
write(**json)
click to toggle source
# File typeprof-0.21.2/lib/typeprof/lsp.rb, line 801 def write(**json) json = JSON.generate(json.merge(jsonrpc: "2.0")) @io << "Content-Length: #{ json.bytesize }\r\n\r\n" << json @io.flush end