class TypeProf::LSP::Message
Constants
- Classes
- Table
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 38 def self.build_table Classes.each do |klass| Table[klass::METHOD] = klass end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 44 def self.find(method) Table[method] end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 33 def self.inherited(klass) Classes << klass end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 4 def initialize(server, json) @server = server @id = json[:id] @method = json[:method] @params = json[:params] end
: (Server, untyped) -> void
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 15 def log(msg) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 28 def notify(method, **params) @server.send_notification(method, **params) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 18 def respond(result) raise "do not respond to notification" if @id == nil @server.send_response(id: @id, result: result) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 23 def respond_error(error) raise "do not respond to notification" if @id == nil @server.send_response(id: @id, error: error) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/lsp/messages.rb, line 11 def run p [:ignored, @method] end