module Solargraph::LanguageServer::Message
The Message
namespace contains classes that implement language server protocol methods.
Public Class Methods
register(path, message_class)
click to toggle source
Register a method name and message for handling by the language server.
@example
Message.register 'initialize', Solargraph::Message::Initialize
@param path [String] The method name @param message_class [Class<Message::Base>] The message class @return [void]
# File lib/solargraph/language_server/message.rb, line 34 def register path, message_class method_map[path] = message_class end
select(path)
click to toggle source
@param path [String] @return [Class<Solargraph::LanguageServer::Message::Base>]
# File lib/solargraph/language_server/message.rb, line 40 def select path if method_map.has_key?(path) method_map[path] elsif path.start_with?('$/') MethodNotImplemented else MethodNotFound end end
Private Class Methods
method_map()
click to toggle source
@return [Hash{String => Class<Message::Base>}]
# File lib/solargraph/language_server/message.rb, line 53 def method_map @method_map ||= {} end