Class: LSP::ExecuteCommandParams

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

Overview

export interface ExecuteCommandParams extends WorkDoneProgressParams

/**
 * The identifier of the actual command handler.
 */
command: string;
/**
 * Arguments that the command should be invoked with.
 */
arguments?: any[];

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ ExecuteCommandParams

Returns a new instance of ExecuteCommandParams.



2627
2628
2629
2630
# File 'lib/lsp/lsp_protocol.rb', line 2627

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[arguments workDoneToken]
end

Instance Attribute Details

#argumentsObject

type: string # type: any[] # type: ProgressToken



2625
2626
2627
# File 'lib/lsp/lsp_protocol.rb', line 2625

def arguments
  @arguments
end

#commandObject

type: string # type: any[] # type: ProgressToken



2625
2626
2627
# File 'lib/lsp/lsp_protocol.rb', line 2625

def command
  @command
end

#workDoneTokenObject

type: string # type: any[] # type: ProgressToken



2625
2626
2627
# File 'lib/lsp/lsp_protocol.rb', line 2625

def workDoneToken
  @workDoneToken
end

Instance Method Details

#from_h!(value) ⇒ Object



2632
2633
2634
2635
2636
2637
2638
# File 'lib/lsp/lsp_protocol.rb', line 2632

def from_h!(value)
  value = {} if value.nil?
  self.command = value['command']
  self.arguments = value['arguments'].map { |val| val } unless value['arguments'].nil?
  self.workDoneToken = value['workDoneToken'] # Unknown type
  self
end