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) ⇒ DeleteFile

Returns a new instance of DeleteFile.



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

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

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

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



42
43
44
# File 'lib/language_server/protocol/interface/delete_file.rb', line 42

def attributes
  @attributes
end

Instance Method Details

#kind"delete"

A delete

Returns:

  • ("delete")


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

def kind
  attributes.fetch(:kind)
end

#optionsDeleteFileOptions

Delete options.

Returns:



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

def options
  attributes.fetch(:options)
end

#to_hashObject



44
45
46
# File 'lib/language_server/protocol/interface/delete_file.rb', line 44

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



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

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

#uristring

The file to delete.

Returns:

  • (string)


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

def uri
  attributes.fetch(:uri)
end