Sha256: df0099c8c2e20db0ef01437b6e97f39b25005d15072e3987756595d8e670b799
Contents?: true
Size: 941 Bytes
Versions: 2
Compression:
Stored size: 941 Bytes
Contents
module LanguageServer module Protocol module Interface # # The result of a hover request. # class Hover def initialize(contents:, range: nil) @attributes = {} @attributes[:contents] = contents @attributes[:range] = range if range @attributes.freeze end # # The hover's content # # @return [string | { language: string; value: string; } | MarkedString[]] def contents attributes.fetch(:contents) end # # An optional range is a range inside a text document # that is used to visualize a hover, e.g. by changing the background color. # # @return [Range] def range attributes.fetch(:range) 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/hover.rb |
language_server-protocol-0.3.0 | lib/language_server/protocol/interface/hover.rb |