Class: LSP::ApplyWorkspaceEditParams

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

Overview

export interface ApplyWorkspaceEditParams

/**
 * An optional label of the workspace edit. This label is
 * presented in the user interface for example on an undo
 * stack to undo the workspace edit.
 */
label?: string;
/**
 * The edits to apply.
 */
edit: WorkspaceEdit;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ ApplyWorkspaceEditParams

Returns a new instance of ApplyWorkspaceEditParams.



2733
2734
2735
2736
# File 'lib/lsp/lsp_protocol.rb', line 2733

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

Instance Attribute Details

#editObject

type: string # type: WorkspaceEdit



2731
2732
2733
# File 'lib/lsp/lsp_protocol.rb', line 2731

def edit
  @edit
end

#labelObject

type: string # type: WorkspaceEdit



2731
2732
2733
# File 'lib/lsp/lsp_protocol.rb', line 2731

def label
  @label
end

Instance Method Details

#from_h!(value) ⇒ Object



2738
2739
2740
2741
2742
2743
# File 'lib/lsp/lsp_protocol.rb', line 2738

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