Class: DSP::RunInTerminalRequestArguments

Inherits:
DSPBase
  • Object
show all
Defined in:
lib/dsp/dsp_protocol.rb

Overview

interface RunInTerminalRequestArguments {

    /** What kind of terminal to launch. */
    kind?: 'integrated' | 'external';
    /** Optional title of the terminal. */
    title?: string;
    /** Working directory of the command. */
    cwd: string;
    /** List of arguments. The first argument is the command to run. */
    args: string[];
    /** Environment key-value pairs that are added to or removed from the default environment. */
    env?: {
        [key: string]: string | null;
    };
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ RunInTerminalRequestArguments

[key: string]: string | null;

}


787
788
789
790
# File 'lib/dsp/dsp_protocol.rb', line 787

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[kind title env]
end

Instance Attribute Details

#argsObject

type: string with value ‘integrated’ | ‘external’ # type: string # type: string # type: string[] # type: {



782
783
784
# File 'lib/dsp/dsp_protocol.rb', line 782

def args
  @args
end

#cwdObject

type: string with value ‘integrated’ | ‘external’ # type: string # type: string # type: string[] # type: {



782
783
784
# File 'lib/dsp/dsp_protocol.rb', line 782

def cwd
  @cwd
end

#envObject

type: string with value ‘integrated’ | ‘external’ # type: string # type: string # type: string[] # type: {



782
783
784
# File 'lib/dsp/dsp_protocol.rb', line 782

def env
  @env
end

#kindObject

type: string with value ‘integrated’ | ‘external’ # type: string # type: string # type: string[] # type: {



782
783
784
# File 'lib/dsp/dsp_protocol.rb', line 782

def kind
  @kind
end

#titleObject

type: string with value ‘integrated’ | ‘external’ # type: string # type: string # type: string[] # type: {



782
783
784
# File 'lib/dsp/dsp_protocol.rb', line 782

def title
  @title
end

Instance Method Details

#from_h!(value) ⇒ Object



792
793
794
795
796
797
798
799
800
# File 'lib/dsp/dsp_protocol.rb', line 792

def from_h!(value)
  value = {} if value.nil?
  self.kind = value['kind'] # Unknown type
  self.title = value['title']
  self.cwd = value['cwd']
  self.args = value['args'].map { |val| val } unless value['args'].nil?
  self.env = value['env'] # Unknown type
  self
end