Class: TypeProf::LSP::Message
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Classes:
| |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
CancelRequest, Exit, Initialize, Initialized, Shutdown, TextDocument::CodeLens, TextDocument::Completion, TextDocument::Definition, TextDocument::DidChange, TextDocument::DidClose, TextDocument::DidOpen, TextDocument::References, TextDocument::SignatureHelp, TextDocument::TypeDefinition, Workspace::DidChangeWatchedFiles, Workspace::ExecuteCommand
|
|
Inherits: | Object |
Defined in: | lib/typeprof/lsp.rb |
Constant Summary
-
Classes =
# File 'lib/typeprof/lsp.rb', line 391[]
-
Table =
# File 'lib/typeprof/lsp.rb', line 396Hash.new(Message)
Class Method Summary
Instance Method Summary
Constructor Details
.new(server, json) ⇒ Message
# File 'lib/typeprof/lsp.rb', line 370
def initialize(server, json) @server = server @id = json[:id] @method = json[:method] @params = json[:params] end
Class Method Details
.build_table
[ GitHub ].find(method)
[ GitHub ]# File 'lib/typeprof/lsp.rb', line 401
def self.find(method) Table[method] end
.inherited(klass)
[ GitHub ]# File 'lib/typeprof/lsp.rb', line 392
def self.inherited(klass) Classes << klass end
Instance Method Details
#respond(result)
[ GitHub ]# File '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)
[ GitHub ]# File '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
[ GitHub ]# File 'lib/typeprof/lsp.rb', line 377
def run p [:ignored, @method] end