Class: LSP::DeleteFile

Inherits:
LSPBase show all
Defined in:
lib/lsp/lsp_types.rb

Overview

export interface DeleteFile extends ResourceOperation

/**
 * A delete
 */
kind: 'delete';
/**
 * The file to delete.
 */
uri: DocumentUri;
/**
 * Delete options.
 */
options?: DeleteFileOptions;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ DeleteFile

Returns a new instance of DeleteFile.



576
577
578
579
# File 'lib/lsp/lsp_types.rb', line 576

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[options]
end

Instance Attribute Details

#kindObject

type: string with value ‘delete’ # type: DocumentUri # type: DeleteFileOptions



574
575
576
# File 'lib/lsp/lsp_types.rb', line 574

def kind
  @kind
end

#optionsObject

type: string with value ‘delete’ # type: DocumentUri # type: DeleteFileOptions



574
575
576
# File 'lib/lsp/lsp_types.rb', line 574

def options
  @options
end

#uriObject

type: string with value ‘delete’ # type: DocumentUri # type: DeleteFileOptions



574
575
576
# File 'lib/lsp/lsp_types.rb', line 574

def uri
  @uri
end

Instance Method Details

#from_h!(value) ⇒ Object



581
582
583
584
585
586
587
# File 'lib/lsp/lsp_types.rb', line 581

def from_h!(value)
  value = {} if value.nil?
  self.kind = value['kind'] # Unknown type
  self.uri = value['uri'] # Unknown type
  self.options = DeleteFileOptions.new(value['options']) unless value['options'].nil?
  self
end