Sha256: 344d26382d8261bffa791ab9f0288bdebabe391af7f7631ce2cf162c8f9d007e
Contents?: true
Size: 942 Bytes
Versions: 7
Compression:
Stored size: 942 Bytes
Contents
module LanguageServer module Protocol module Interfaces # # 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
7 entries across 7 versions & 2 rubygems