class LanguageServer::Protocol::Interface::InitializeResult

Attributes

attributes[R]

Public Class Methods

new(capabilities:, server_info: nil) click to toggle source
# File lib/language_server/protocol/interface/initialize_result.rb, line 5
def initialize(capabilities:, server_info: nil)
  @attributes = {}

  @attributes[:capabilities] = capabilities
  @attributes[:serverInfo] = server_info if server_info

  @attributes.freeze
end

Public Instance Methods

capabilities() click to toggle source

The capabilities the language server provides.

@return [ServerCapabilities]

# File lib/language_server/protocol/interface/initialize_result.rb, line 18
def capabilities
  attributes.fetch(:capabilities)
end
server_info() click to toggle source

Information about the server.

@return [{ name: string; version?: string; }]

# File lib/language_server/protocol/interface/initialize_result.rb, line 26
def server_info
  attributes.fetch(:serverInfo)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/initialize_result.rb, line 32
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/initialize_result.rb, line 36
def to_json(*args)
  to_hash.to_json(*args)
end