Class: LanguageServer::Protocol::Interface::WorkspaceFoldersInitializeParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::WorkspaceFoldersInitializeParams
- Defined in:
- lib/language_server/protocol/interface/workspace_folders_initialize_params.rb,
sig/language_server/protocol/interface/workspace_folders_initialize_params.rbs
Instance Attribute Summary collapse
-
#attributes ⇒ Hash[Symbol, untyped]
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(workspace_folders: nil) ⇒ WorkspaceFoldersInitializeParams
constructor
A new instance of WorkspaceFoldersInitializeParams.
- #to_hash ⇒ Hash[Symbol, untyped]
- #to_json(*args) ⇒ String
-
#workspace_folders ⇒ WorkspaceFolder[]
The workspace folders configured in the client when the server starts.
Constructor Details
#initialize(workspace_folders: nil) ⇒ WorkspaceFoldersInitializeParams
Returns a new instance of WorkspaceFoldersInitializeParams.
5 6 7 8 9 10 11 |
# File 'lib/language_server/protocol/interface/workspace_folders_initialize_params.rb', line 5 def initialize(workspace_folders: nil) @attributes = {} @attributes[:workspaceFolders] = workspace_folders if workspace_folders @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Hash[Symbol, untyped] (readonly)
Returns the value of attribute attributes.
27 28 29 |
# File 'lib/language_server/protocol/interface/workspace_folders_initialize_params.rb', line 27 def attributes @attributes end |
Instance Method Details
#to_hash ⇒ Hash[Symbol, untyped]
29 30 31 |
# File 'lib/language_server/protocol/interface/workspace_folders_initialize_params.rb', line 29 def to_hash attributes end |
#to_json(*args) ⇒ String
33 34 35 |
# File 'lib/language_server/protocol/interface/workspace_folders_initialize_params.rb', line 33 def to_json(*args) to_hash.to_json(*args) end |
#workspace_folders ⇒ WorkspaceFolder[]
The workspace folders configured in the client when the server starts.
This property is only available if the client supports workspace folders.
It can be null if the client supports workspace folders but none are
configured.
23 24 25 |
# File 'lib/language_server/protocol/interface/workspace_folders_initialize_params.rb', line 23 def workspace_folders attributes.fetch(:workspaceFolders) end |