Class: DSP::SetVariableArguments

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

Overview

interface SetVariableArguments {

    /** The reference of the variable container. */
    variablesReference: number;
    /** The name of the variable in the container. */
    name: string;
    /** The value of the variable. */
    value: string;
    /** Specifies details on how to format the response value. */
    format?: ValueFormat;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ SetVariableArguments

Returns a new instance of SetVariableArguments.



2485
2486
2487
2488
# File 'lib/dsp/dsp_protocol.rb', line 2485

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

Instance Attribute Details

#formatObject

type: number # type: string # type: string # type: ValueFormat



2483
2484
2485
# File 'lib/dsp/dsp_protocol.rb', line 2483

def format
  @format
end

#nameObject

type: number # type: string # type: string # type: ValueFormat



2483
2484
2485
# File 'lib/dsp/dsp_protocol.rb', line 2483

def name
  @name
end

#valueObject

type: number # type: string # type: string # type: ValueFormat



2483
2484
2485
# File 'lib/dsp/dsp_protocol.rb', line 2483

def value
  @value
end

#variablesReferenceObject

type: number # type: string # type: string # type: ValueFormat



2483
2484
2485
# File 'lib/dsp/dsp_protocol.rb', line 2483

def variablesReference
  @variablesReference
end

Instance Method Details

#from_h!(value) ⇒ Object



2490
2491
2492
2493
2494
2495
2496
2497
# File 'lib/dsp/dsp_protocol.rb', line 2490

def from_h!(value)
  value = {} if value.nil?
  self.variablesReference = value['variablesReference']
  self.name = value['name']
  self.value = value['value']
  self.format = ValueFormat.new(value['format']) unless value['format'].nil?
  self
end