class LanguageServer::Protocol::Interface::ColorInformation

Attributes

attributes[R]

Public Class Methods

new(range:, color:) click to toggle source
# File lib/language_server/protocol/interface/color_information.rb, line 5
def initialize(range:, color:)
  @attributes = {}

  @attributes[:range] = range
  @attributes[:color] = color

  @attributes.freeze
end

Public Instance Methods

color() click to toggle source

The actual color value for this color range.

@return [Color]

# File lib/language_server/protocol/interface/color_information.rb, line 26
def color
  attributes.fetch(:color)
end
range() click to toggle source

The range in the document where this color appears.

@return [Range]

# File lib/language_server/protocol/interface/color_information.rb, line 18
def range
  attributes.fetch(:range)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/color_information.rb, line 32
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/color_information.rb, line 36
def to_json(*args)
  to_hash.to_json(*args)
end