class LanguageServer::Protocol::Interface::Moniker
Moniker
definition to match LSIF 0.5 moniker definition.
Attributes
attributes[R]
Public Class Methods
new(scheme:, identifier:, unique:, kind: nil)
click to toggle source
# File lib/language_server/protocol/interface/moniker.rb, line 8 def initialize(scheme:, identifier:, unique:, kind: nil) @attributes = {} @attributes[:scheme] = scheme @attributes[:identifier] = identifier @attributes[:unique] = unique @attributes[:kind] = kind if kind @attributes.freeze end
Public Instance Methods
identifier()
click to toggle source
The identifier of the moniker. The value is opaque in LSIF however schema owners are allowed to define the structure if they want.
@return [string]
# File lib/language_server/protocol/interface/moniker.rb, line 32 def identifier attributes.fetch(:identifier) end
kind()
click to toggle source
The moniker kind if known.
@return [MonikerKind]
# File lib/language_server/protocol/interface/moniker.rb, line 48 def kind attributes.fetch(:kind) end
scheme()
click to toggle source
The scheme of the moniker. For example tsc or .Net
@return [string]
# File lib/language_server/protocol/interface/moniker.rb, line 23 def scheme attributes.fetch(:scheme) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/moniker.rb, line 54 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/moniker.rb, line 58 def to_json(*args) to_hash.to_json(*args) end
unique()
click to toggle source
The scope in which the moniker is unique
@return [UniquenessLevel]
# File lib/language_server/protocol/interface/moniker.rb, line 40 def unique attributes.fetch(:unique) end