Class: DSP::VariablesArguments

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

Overview

interface VariablesArguments {

    /** The Variable reference. */
    variablesReference: number;
    /** Optional filter to limit the child variables to either named or indexed. If omitted, both types are fetched. */
    filter?: 'indexed' | 'named';
    /** The index of the first variable to return; if omitted children start at 0. */
    start?: number;
    /** The number of variables to return. If count is missing or 0, all variables are returned. */
    count?: number;
    /** Specifies details on how to format the Variable values.
        The attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true.
    */
    format?: ValueFormat;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ VariablesArguments

Returns a new instance of VariablesArguments.



2409
2410
2411
2412
# File 'lib/dsp/dsp_protocol.rb', line 2409

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

Instance Attribute Details

#countObject

type: number # type: string with value ‘indexed’ | ‘named’ # type: number # type: number # type: ValueFormat



2407
2408
2409
# File 'lib/dsp/dsp_protocol.rb', line 2407

def count
  @count
end

#filterObject

type: number # type: string with value ‘indexed’ | ‘named’ # type: number # type: number # type: ValueFormat



2407
2408
2409
# File 'lib/dsp/dsp_protocol.rb', line 2407

def filter
  @filter
end

#formatObject

type: number # type: string with value ‘indexed’ | ‘named’ # type: number # type: number # type: ValueFormat



2407
2408
2409
# File 'lib/dsp/dsp_protocol.rb', line 2407

def format
  @format
end

#startObject

type: number # type: string with value ‘indexed’ | ‘named’ # type: number # type: number # type: ValueFormat



2407
2408
2409
# File 'lib/dsp/dsp_protocol.rb', line 2407

def start
  @start
end

#variablesReferenceObject

type: number # type: string with value ‘indexed’ | ‘named’ # type: number # type: number # type: ValueFormat



2407
2408
2409
# File 'lib/dsp/dsp_protocol.rb', line 2407

def variablesReference
  @variablesReference
end

Instance Method Details

#from_h!(value) ⇒ Object



2414
2415
2416
2417
2418
2419
2420
2421
2422
# File 'lib/dsp/dsp_protocol.rb', line 2414

def from_h!(value)
  value = {} if value.nil?
  self.variablesReference = value['variablesReference']
  self.filter = value['filter'] # Unknown type
  self.start = value['start']
  self.count = value['count']
  self.format = ValueFormat.new(value['format']) unless value['format'].nil?
  self
end