Class: LanguageServer::Protocol::Interface::LSPObject

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

Overview

LSP object definition.

Since:

  • 3.17.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLSPObject

Returns a new instance of LSPObject.

Since:

  • 3.17.0



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

#attributesObject (readonly)

Since:

  • 3.17.0



16
17
18
# File 'lib/language_server/protocol/interface/lsp_object.rb', line 16

def attributes
  @attributes
end

Instance Method Details

#to_hashObject

Since:

  • 3.17.0



18
19
20
# File 'lib/language_server/protocol/interface/lsp_object.rb', line 18

def to_hash
  attributes
end

#to_json(*args) ⇒ Object

Since:

  • 3.17.0



22
23
24
# File 'lib/language_server/protocol/interface/lsp_object.rb', line 22

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