Class: LanguageServer::Protocol::Interfaces::SymbolInformation
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interfaces::SymbolInformation
- Defined in:
- lib/language_server/protocol/interfaces/symbol_information.rb
Overview
Represents information about programming constructs like variables, classes, interfaces etc.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#container_name ⇒ string
The name of the symbol containing this symbol.
-
#initialize(name:, kind:, location:, container_name: nil) ⇒ SymbolInformation
constructor
A new instance of SymbolInformation.
-
#kind ⇒ number
The kind of this symbol.
-
#location ⇒ Location
The location of this symbol.
-
#name ⇒ string
The name of this symbol.
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(name:, kind:, location:, container_name: nil) ⇒ SymbolInformation
Returns a new instance of SymbolInformation.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/language_server/protocol/interfaces/symbol_information.rb', line 9 def initialize(name:, kind:, location:, container_name: nil) @attributes = {} @attributes[:name] = name @attributes[:kind] = kind @attributes[:location] = location @attributes[:containerName] = container_name if container_name @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
52 53 54 |
# File 'lib/language_server/protocol/interfaces/symbol_information.rb', line 52 def attributes @attributes end |
Instance Method Details
#container_name ⇒ string
The name of the symbol containing this symbol.
48 49 50 |
# File 'lib/language_server/protocol/interfaces/symbol_information.rb', line 48 def container_name attributes.fetch(:containerName) end |
#kind ⇒ number
The kind of this symbol.
32 33 34 |
# File 'lib/language_server/protocol/interfaces/symbol_information.rb', line 32 def kind attributes.fetch(:kind) end |
#location ⇒ Location
The location of this symbol.
40 41 42 |
# File 'lib/language_server/protocol/interfaces/symbol_information.rb', line 40 def location attributes.fetch(:location) end |
#name ⇒ string
The name of this symbol.
24 25 26 |
# File 'lib/language_server/protocol/interfaces/symbol_information.rb', line 24 def name attributes.fetch(:name) end |
#to_json(*args) ⇒ Object
54 55 56 |
# File 'lib/language_server/protocol/interfaces/symbol_information.rb', line 54 def to_json(*args) attributes.to_json(*args) end |