class LanguageServer::Protocol::Interface::WillSaveTextDocumentParams

The parameters send in a will save text document notification.

Attributes

attributes[R]

Public Class Methods

new(text_document:, reason:) click to toggle source
# File lib/language_server/protocol/interface/will_save_text_document_params.rb, line 8
def initialize(text_document:, reason:)
  @attributes = {}

  @attributes[:textDocument] = text_document
  @attributes[:reason] = reason

  @attributes.freeze
end

Public Instance Methods

reason() click to toggle source

The 'TextDocumentSaveReason'.

@return [TextDocumentSaveReason]

# File lib/language_server/protocol/interface/will_save_text_document_params.rb, line 29
def reason
  attributes.fetch(:reason)
end
text_document() click to toggle source

The document that will be saved.

@return [TextDocumentIdentifier]

# File lib/language_server/protocol/interface/will_save_text_document_params.rb, line 21
def text_document
  attributes.fetch(:textDocument)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/will_save_text_document_params.rb, line 35
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/will_save_text_document_params.rb, line 39
def to_json(*args)
  to_hash.to_json(*args)
end