Sha256: 37ae490c5855abc6bd9022e20428ddb234f3702a158b19c7b14b333f83fc39a5
Contents?: true
Size: 1.12 KB
Versions: 8
Compression:
Stored size: 1.12 KB
Contents
module LanguageServer module Protocol module Interface # # Contains additional information about the context in which a completion request is triggered. # class CompletionContext def initialize(trigger_kind:, trigger_character: nil) @attributes = {} @attributes[:triggerKind] = trigger_kind @attributes[:triggerCharacter] = trigger_character if trigger_character @attributes.freeze end # # How the completion was triggered. # # @return [CompletionTriggerKind] def trigger_kind attributes.fetch(:triggerKind) end # # The trigger character (a single character) that has trigger code complete. # Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` # # @return [string] def trigger_character attributes.fetch(:triggerCharacter) end attr_reader :attributes def to_hash attributes end def to_json(*args) to_hash.to_json(*args) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems