class TypeProf::LSP::Message

Constants

Classes
Table

Public Class Methods

build_table() click to toggle source
# File typeprof-0.21.9/lib/typeprof/lsp.rb, line 397
def self.build_table
  Classes.each {|klass| Table[klass::METHOD] = klass }
end
find(method) click to toggle source
# File typeprof-0.21.9/lib/typeprof/lsp.rb, line 401
def self.find(method)
  Table[method]
end
inherited(klass) click to toggle source
# File typeprof-0.21.9/lib/typeprof/lsp.rb, line 392
def self.inherited(klass)
  Classes << klass
end
new(server, json) click to toggle source
# File typeprof-0.21.9/lib/typeprof/lsp.rb, line 370
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.9/lib/typeprof/lsp.rb, line 381
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.9/lib/typeprof/lsp.rb, line 386
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.9/lib/typeprof/lsp.rb, line 377
def run
  p [:ignored, @method]
end