Class: LSP::RenameFileOptions

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

Overview

export interface RenameFileOptions

/**
 * Overwrite target if existing. Overwrite wins over `ignoreIfExists`
 */
overwrite?: boolean;
/**
 * Ignores if target exists.
 */
ignoreIfExists?: boolean;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ RenameFileOptions

Returns a new instance of RenameFileOptions.



484
485
486
487
# File 'lib/lsp/lsp_types.rb', line 484

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[overwrite ignoreIfExists]
end

Instance Attribute Details

#ignoreIfExistsObject

type: boolean # type: boolean



482
483
484
# File 'lib/lsp/lsp_types.rb', line 482

def ignoreIfExists
  @ignoreIfExists
end

#overwriteObject

type: boolean # type: boolean



482
483
484
# File 'lib/lsp/lsp_types.rb', line 482

def overwrite
  @overwrite
end

Instance Method Details

#from_h!(value) ⇒ Object



489
490
491
492
493
494
# File 'lib/lsp/lsp_types.rb', line 489

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