Class: LSP::CreateFile
Overview
export interface CreateFile extends ResourceOperation
/**
* A create
*/
kind: 'create';
/**
* The resource to create.
*/
uri: DocumentUri;
/**
* Additional options
*/
options?: CreateFileOptions;
Instance Attribute Summary collapse
-
#kind ⇒ Object
type: string with value ‘create’ # type: DocumentUri # type: CreateFileOptions.
-
#options ⇒ Object
type: string with value ‘create’ # type: DocumentUri # type: CreateFileOptions.
-
#uri ⇒ Object
type: string with value ‘create’ # type: DocumentUri # type: CreateFileOptions.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ CreateFile
constructor
A new instance of CreateFile.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ CreateFile
Returns a new instance of CreateFile.
457 458 459 460 |
# File 'lib/lsp/lsp_types.rb', line 457 def initialize(initial_hash = nil) super @optional_method_names = %i[options] end |
Instance Attribute Details
#kind ⇒ Object
type: string with value ‘create’ # type: DocumentUri # type: CreateFileOptions
455 456 457 |
# File 'lib/lsp/lsp_types.rb', line 455 def kind @kind end |
#options ⇒ Object
type: string with value ‘create’ # type: DocumentUri # type: CreateFileOptions
455 456 457 |
# File 'lib/lsp/lsp_types.rb', line 455 def @options end |
#uri ⇒ Object
type: string with value ‘create’ # type: DocumentUri # type: CreateFileOptions
455 456 457 |
# File 'lib/lsp/lsp_types.rb', line 455 def uri @uri end |
Instance Method Details
#from_h!(value) ⇒ Object
462 463 464 465 466 467 468 |
# File 'lib/lsp/lsp_types.rb', line 462 def from_h!(value) value = {} if value.nil? self.kind = value['kind'] # Unknown type self.uri = value['uri'] # Unknown type self. = CreateFileOptions.new(value['options']) unless value['options'].nil? self end |