Class: LanguageServer::Protocol::Interface::WindowClientCapabilities

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/window_client_capabilities.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(work_done_progress: nil, show_message: nil, show_document: nil) ⇒ WindowClientCapabilities



5
6
7
8
9
10
11
12
13
# File 'lib/language_server/protocol/interface/window_client_capabilities.rb', line 5

def initialize(work_done_progress: nil, show_message: nil, show_document: nil)
  @attributes = {}

  @attributes[:workDoneProgress] = work_done_progress if work_done_progress
  @attributes[:showMessage] = show_message if show_message
  @attributes[:showDocument] = show_document if show_document

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



51
52
53
# File 'lib/language_server/protocol/interface/window_client_capabilities.rb', line 51

def attributes
  @attributes
end

Instance Method Details

#show_documentShowDocumentClientCapabilities | nil

Capabilities specific to the showDocument request.

Since:

  • 3.16.0



47
48
49
# File 'lib/language_server/protocol/interface/window_client_capabilities.rb', line 47

def show_document
  attributes.fetch(:showDocument)
end

#show_messageShowMessageRequestClientCapabilities | nil

Capabilities specific to the showMessage request.

Since:

  • 3.16.0



37
38
39
# File 'lib/language_server/protocol/interface/window_client_capabilities.rb', line 37

def show_message
  attributes.fetch(:showMessage)
end

#to_hashObject



53
54
55
# File 'lib/language_server/protocol/interface/window_client_capabilities.rb', line 53

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



57
58
59
# File 'lib/language_server/protocol/interface/window_client_capabilities.rb', line 57

def to_json(*args)
  to_hash.to_json(*args)
end

#work_done_progressboolean | nil

It indicates whether the client supports server initiated progress using the window/workDoneProgress/create request.

The capability also controls Whether client supports handling of progress notifications. If set servers are allowed to report a workDoneProgress property in the request specific server capabilities.

Since:

  • 3.15.0



27
28
29
# File 'lib/language_server/protocol/interface/window_client_capabilities.rb', line 27

def work_done_progress
  attributes.fetch(:workDoneProgress)
end