Class: DSP::SetVariableArguments
- 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
-
#format ⇒ Object
type: number # type: string # type: string # type: ValueFormat.
-
#name ⇒ Object
type: number # type: string # type: string # type: ValueFormat.
-
#value ⇒ Object
type: number # type: string # type: string # type: ValueFormat.
-
#variablesReference ⇒ Object
type: number # type: string # type: string # type: ValueFormat.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ SetVariableArguments
constructor
A new instance of SetVariableArguments.
Methods inherited from DSPBase
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
#format ⇒ Object
type: number # type: string # type: string # type: ValueFormat
2483 2484 2485 |
# File 'lib/dsp/dsp_protocol.rb', line 2483 def format @format end |
#name ⇒ Object
type: number # type: string # type: string # type: ValueFormat
2483 2484 2485 |
# File 'lib/dsp/dsp_protocol.rb', line 2483 def name @name end |
#value ⇒ Object
type: number # type: string # type: string # type: ValueFormat
2483 2484 2485 |
# File 'lib/dsp/dsp_protocol.rb', line 2483 def value @value end |
#variablesReference ⇒ Object
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 |