Class: LanguageServer::Protocol::Interface::LSPObject
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::LSPObject
- Defined in:
- lib/language_server/protocol/interface/lsp_object.rb
Overview
LSP object definition.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#initialize ⇒ LSPObject
constructor
A new instance of LSPObject.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize ⇒ LSPObject
Returns a new instance of LSPObject.
9 10 11 12 13 14 |
# File 'lib/language_server/protocol/interface/lsp_object.rb', line 9 def initialize() @attributes = {} @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
16 17 18 |
# File 'lib/language_server/protocol/interface/lsp_object.rb', line 16 def attributes @attributes end |
Instance Method Details
#to_hash ⇒ Object
18 19 20 |
# File 'lib/language_server/protocol/interface/lsp_object.rb', line 18 def to_hash attributes end |
#to_json(*args) ⇒ Object
22 23 24 |
# File 'lib/language_server/protocol/interface/lsp_object.rb', line 22 def to_json(*args) to_hash.to_json(*args) end |