Class: LSP::ApplyWorkspaceEditResponse

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

Overview

export interface ApplyWorkspaceEditResponse { /** * Indicates whether the edit was applied or not. / applied: boolean; /* * An optional textual description for why the edit was not applied. * This may be used by the server for diagnostic logging or to provide * a suitable error for a request that triggered the edit. / failureReason?: string; /* * Depending on the client's failure handling strategy failedChange might * contain the index of the change that failed. This property is only available * if the client signals a failureHandlingStrategy in its client capabilities. */ failedChange?: number; }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ ApplyWorkspaceEditResponse

Returns a new instance of ApplyWorkspaceEditResponse.



2767
2768
2769
2770
# File 'lib/lsp/lsp_protocol.rb', line 2767

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

Instance Attribute Details

#appliedObject

type: boolean # type: string # type: number



2765
2766
2767
# File 'lib/lsp/lsp_protocol.rb', line 2765

def applied
  @applied
end

#failedChangeObject

type: boolean # type: string # type: number



2765
2766
2767
# File 'lib/lsp/lsp_protocol.rb', line 2765

def failedChange
  @failedChange
end

#failureReasonObject

type: boolean # type: string # type: number



2765
2766
2767
# File 'lib/lsp/lsp_protocol.rb', line 2765

def failureReason
  @failureReason
end

Instance Method Details

#from_h!(value) ⇒ Object



2772
2773
2774
2775
2776
2777
2778
# File 'lib/lsp/lsp_protocol.rb', line 2772

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