Class: LanguageServer::Protocol::Interface::WorkspaceFolder
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::WorkspaceFolder
- Defined in:
- lib/language_server/protocol/interface/workspace_folder.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(uri:, name:) ⇒ WorkspaceFolder
constructor
A new instance of WorkspaceFolder.
-
#name ⇒ string
The name of the workspace folder.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#uri ⇒ string
The associated URI for this workspace folder.
Constructor Details
#initialize(uri:, name:) ⇒ WorkspaceFolder
Returns a new instance of WorkspaceFolder.
5 6 7 8 9 10 11 12 |
# File 'lib/language_server/protocol/interface/workspace_folder.rb', line 5 def initialize(uri:, name:) @attributes = {} @attributes[:uri] = uri @attributes[:name] = name @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
31 32 33 |
# File 'lib/language_server/protocol/interface/workspace_folder.rb', line 31 def attributes @attributes end |
Instance Method Details
#name ⇒ string
The name of the workspace folder. Used to refer to this workspace folder in the user interface.
27 28 29 |
# File 'lib/language_server/protocol/interface/workspace_folder.rb', line 27 def name attributes.fetch(:name) end |
#to_hash ⇒ Object
33 34 35 |
# File 'lib/language_server/protocol/interface/workspace_folder.rb', line 33 def to_hash attributes end |
#to_json(*args) ⇒ Object
37 38 39 |
# File 'lib/language_server/protocol/interface/workspace_folder.rb', line 37 def to_json(*args) to_hash.to_json(*args) end |
#uri ⇒ string
The associated URI for this workspace folder.
18 19 20 |
# File 'lib/language_server/protocol/interface/workspace_folder.rb', line 18 def uri attributes.fetch(:uri) end |