class TypeProf::LSP::Message

Constants

Classes
Table

Public Class Methods

build_table() click to toggle source
# File typeprof-0.21.2/lib/typeprof/lsp.rb, line 394
def self.build_table
  Classes.each {|klass| Table[klass::METHOD] = klass }
end
find(method) click to toggle source
# File typeprof-0.21.2/lib/typeprof/lsp.rb, line 398
def self.find(method)
  Table[method]
end
inherited(klass) click to toggle source
# File typeprof-0.21.2/lib/typeprof/lsp.rb, line 389
def self.inherited(klass)
  Classes << klass
end
new(server, json) click to toggle source
# File typeprof-0.21.2/lib/typeprof/lsp.rb, line 367
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.2/lib/typeprof/lsp.rb, line 378
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.2/lib/typeprof/lsp.rb, line 383
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.2/lib/typeprof/lsp.rb, line 374
def run
  p [:ignored, @method]
end