Class: LSP::CreateFileOptions
Overview
export interface CreateFileOptions
/**
* Overwrite existing file. Overwrite wins over `ignoreIfExists`
*/
overwrite?: boolean;
/**
* Ignore if exists.
*/
ignoreIfExists?: boolean;
Instance Attribute Summary collapse
-
#ignoreIfExists ⇒ Object
type: boolean # type: boolean.
-
#overwrite ⇒ Object
type: boolean # type: boolean.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ CreateFileOptions
constructor
A new instance of CreateFileOptions.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ CreateFileOptions
Returns a new instance of CreateFileOptions.
427 428 429 430 |
# File 'lib/lsp/lsp_types.rb', line 427 def initialize(initial_hash = nil) super @optional_method_names = %i[overwrite ignoreIfExists] end |
Instance Attribute Details
#ignoreIfExists ⇒ Object
type: boolean # type: boolean
425 426 427 |
# File 'lib/lsp/lsp_types.rb', line 425 def ignoreIfExists @ignoreIfExists end |
#overwrite ⇒ Object
type: boolean # type: boolean
425 426 427 |
# File 'lib/lsp/lsp_types.rb', line 425 def overwrite @overwrite end |
Instance Method Details
#from_h!(value) ⇒ Object
432 433 434 435 436 437 |
# File 'lib/lsp/lsp_types.rb', line 432 def from_h!(value) value = {} if value.nil? self.overwrite = value['overwrite'] # Unknown type self.ignoreIfExists = value['ignoreIfExists'] # Unknown type self end |