Sha256: b073bbe8d1917e23423c0687c93da4d428f70906b600308af38c3ba3e1ae69b7
Contents?: true
Size: 975 Bytes
Versions: 110
Compression:
Stored size: 975 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 [MarkupContent | MarkedString | 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_hash attributes end def to_json(*args) to_hash.to_json(*args) end end end end end
Version data entries
110 entries across 110 versions & 15 rubygems