Sha256: d6fd1815e69ab7cffa65c74e06896953c416e826345185752958c4356feb5e8b
Contents?: true
Size: 992 Bytes
Versions: 1
Compression:
Stored size: 992 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_hash attributes end def to_json(*args) to_hash.to_json(*args) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
language_server-protocol-0.5.0 | lib/language_server/protocol/interface/hover.rb |