class TypeProf::LSP::Message

Constants

Classes
Table

Public Class Methods

build_table() click to toggle source
# File typeprof-0.21.7/lib/typeprof/lsp.rb, line 396
def self.build_table
  Classes.each {|klass| Table[klass::METHOD] = klass }
end
find(method) click to toggle source
# File typeprof-0.21.7/lib/typeprof/lsp.rb, line 400
def self.find(method)
  Table[method]
end
inherited(klass) click to toggle source
# File typeprof-0.21.7/lib/typeprof/lsp.rb, line 391
def self.inherited(klass)
  Classes << klass
end
new(server, json) click to toggle source
# File typeprof-0.21.7/lib/typeprof/lsp.rb, line 369
def initialize(server, json)
  @server = server
  @id = json[:id]
  @method = json[:method]
  @params = json[:params]
end

Public Instance Methods

respond(result) click to toggle source
# File typeprof-0.21.7/lib/typeprof/lsp.rb, line 380
def respond(result)
  raise "do not respond to notification" if @id == nil
  @server.send_response(id: @id, result: result)
end
respond_error(error) click to toggle source
# File typeprof-0.21.7/lib/typeprof/lsp.rb, line 385
def respond_error(error)
  raise "do not respond to notification" if @id == nil
  @server.send_response(id: @id, error: error)
end
run() click to toggle source
# File typeprof-0.21.7/lib/typeprof/lsp.rb, line 376
def run
  p [:ignored, @method]
end