Sha256: 3d17697e837762eb20ab3163841ed90e77cb7d3e887c5646c325ce50829f8fc4
Contents?: true
Size: 1.29 KB
Versions: 2
Compression:
Stored size: 1.29 KB
Contents
module LanguageServer module Protocol module Interface # # Represents information about programming constructs like variables, classes, # interfaces etc. # class SymbolInformation 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 # # The name of this symbol. # # @return [string] def name attributes.fetch(:name) end # # The kind of this symbol. # # @return [number] def kind attributes.fetch(:kind) end # # The location of this symbol. # # @return [Location] def location attributes.fetch(:location) end # # The name of the symbol containing this symbol. # # @return [string] def container_name attributes.fetch(:containerName) end attr_reader :attributes def to_json(*args) attributes.to_json(*args) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
language_server-protocol-0.4.0 | lib/language_server/protocol/interface/symbol_information.rb |
language_server-protocol-0.3.0 | lib/language_server/protocol/interface/symbol_information.rb |