class TypeProf::LSP::Message
常量
- 类
- 表
公共类方法
build_table() 点击切换源代码
# File typeprof-0.30.1/lib/typeprof/lsp/messages.rb, line 37 def self.build_table Classes.each do |klass| Table[klass::METHOD] = klass end end
find(method) 点击切换源代码
# File typeprof-0.30.1/lib/typeprof/lsp/messages.rb, line 43 def self.find(method) Table[method] end
inherited(klass) 点击切换源代码
# File typeprof-0.30.1/lib/typeprof/lsp/messages.rb, line 32 def self.inherited(klass) Classes << klass end
new(server, json) 点击切换源代码
# File typeprof-0.30.1/lib/typeprof/lsp/messages.rb, line 3 def initialize(server, json) @server = server @id = json[:id] @method = json[:method] @params = json[:params] end
公共实例方法
log(msg) 点击切换源代码
# File typeprof-0.30.1/lib/typeprof/lsp/messages.rb, line 14 def log(msg) end
notify(method, **params) 点击切换源代码
# File typeprof-0.30.1/lib/typeprof/lsp/messages.rb, line 27 def notify(method, **params) @server.send_notification(method, **params) end
respond(result) 点击切换源代码
# File typeprof-0.30.1/lib/typeprof/lsp/messages.rb, line 17 def respond(result) raise "do not respond to notification" if @id == nil @server.send_response(id: @id, result: result) end
respond_error(error) 点击切换源代码
# File typeprof-0.30.1/lib/typeprof/lsp/messages.rb, line 22 def respond_error(error) raise "do not respond to notification" if @id == nil @server.send_response(id: @id, error: error) end
run() 点击切换源代码
# File typeprof-0.30.1/lib/typeprof/lsp/messages.rb, line 10 def run p [:ignored, @method] end