Class: LanguageServer::Protocol::Interface::DeleteFile

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/delete_file.rb

Overview

Delete file operation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind:, uri:, options: nil, annotation_id: nil) ⇒ DeleteFile

Returns a new instance of DeleteFile.



8
9
10
11
12
13
14
15
16
17
# File 'lib/language_server/protocol/interface/delete_file.rb', line 8

def initialize(kind:, uri:, options: nil, annotation_id: nil)
  @attributes = {}

  @attributes[:kind] = kind
  @attributes[:uri] = uri
  @attributes[:options] = options if options
  @attributes[:annotationId] = annotation_id if annotation_id

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



53
54
55
# File 'lib/language_server/protocol/interface/delete_file.rb', line 53

def attributes
  @attributes
end

Instance Method Details

#annotation_idChangeAnnotationIdentifier | nil

An optional annotation identifier describing the operation.

Returns:

  • (ChangeAnnotationIdentifier | nil)

Since:

  • 3.16.0



49
50
51
# File 'lib/language_server/protocol/interface/delete_file.rb', line 49

def annotation_id
  attributes.fetch(:annotationId)
end

#kind"delete"

A delete

Returns:

  • ("delete")


23
24
25
# File 'lib/language_server/protocol/interface/delete_file.rb', line 23

def kind
  attributes.fetch(:kind)
end

#optionsDeleteFileOptions | nil

Delete options.

Returns:



39
40
41
# File 'lib/language_server/protocol/interface/delete_file.rb', line 39

def options
  attributes.fetch(:options)
end

#to_hashObject



55
56
57
# File 'lib/language_server/protocol/interface/delete_file.rb', line 55

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



59
60
61
# File 'lib/language_server/protocol/interface/delete_file.rb', line 59

def to_json(*args)
  to_hash.to_json(*args)
end

#uriDocumentUri

The file to delete.

Returns:

  • (DocumentUri)


31
32
33
# File 'lib/language_server/protocol/interface/delete_file.rb', line 31

def uri
  attributes.fetch(:uri)
end