Class: LSP::DeleteFileOptions

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

Overview

export interface DeleteFileOptions

/**
 * Delete the content recursively if a folder is denoted.
 */
recursive?: boolean;
/**
 * Ignore the operation if the file doesn't exist.
 */
ignoreIfNotExists?: boolean;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ DeleteFileOptions

Returns a new instance of DeleteFileOptions.



546
547
548
549
# File 'lib/lsp/lsp_types.rb', line 546

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[recursive ignoreIfNotExists]
end

Instance Attribute Details

#ignoreIfNotExistsObject

type: boolean # type: boolean



544
545
546
# File 'lib/lsp/lsp_types.rb', line 544

def ignoreIfNotExists
  @ignoreIfNotExists
end

#recursiveObject

type: boolean # type: boolean



544
545
546
# File 'lib/lsp/lsp_types.rb', line 544

def recursive
  @recursive
end

Instance Method Details

#from_h!(value) ⇒ Object



551
552
553
554
555
556
# File 'lib/lsp/lsp_types.rb', line 551

def from_h!(value)
  value = {} if value.nil?
  self.recursive = value['recursive'] # Unknown type
  self.ignoreIfNotExists = value['ignoreIfNotExists'] # Unknown type
  self
end