class LanguageServer::Protocol::Interface::ChangeAnnotation

Additional information that describes document changes.

Attributes

attributes[R]

Public Class Methods

new(label:, needs_confirmation: nil, description: nil) click to toggle source
# File lib/language_server/protocol/interface/change_annotation.rb, line 8
def initialize(label:, needs_confirmation: nil, description: nil)
  @attributes = {}

  @attributes[:label] = label
  @attributes[:needsConfirmation] = needs_confirmation if needs_confirmation
  @attributes[:description] = description if description

  @attributes.freeze
end

Public Instance Methods

description() click to toggle source

A human-readable string which is rendered less prominent in the user interface.

@return [string]

# File lib/language_server/protocol/interface/change_annotation.rb, line 41
def description
  attributes.fetch(:description)
end
label() click to toggle source

A human-readable string describing the actual change. The string is rendered prominent in the user interface.

@return [string]

# File lib/language_server/protocol/interface/change_annotation.rb, line 23
def label
  attributes.fetch(:label)
end
needs_confirmation() click to toggle source

A flag which indicates that user confirmation is needed before applying the change.

@return [boolean]

# File lib/language_server/protocol/interface/change_annotation.rb, line 32
def needs_confirmation
  attributes.fetch(:needsConfirmation)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/change_annotation.rb, line 47
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/change_annotation.rb, line 51
def to_json(*args)
  to_hash.to_json(*args)
end