Class: DSP::Variable
Overview
interface Variable {
/** The variable's name. */
name: string;
/** The variable's value. This can be a multi-line text, e.g. for a function the body of a function. */
value: string;
/** The type of the variable's value. Typically shown in the UI when hovering over the value.
This attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request.
*/
type?: string;
/** Properties of a variable that can be used to determine how to render the variable in the UI. */
presentationHint?: VariablePresentationHint;
/** Optional evaluatable name of this variable which can be passed to the 'EvaluateRequest' to fetch the variable's value. */
evaluateName?: string;
/** If variablesReference is > 0, the variable is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. */
variablesReference: number;
/** The number of named child variables.
The client can use this optional information to present the children in a paged UI and fetch them in chunks.
*/
namedVariables?: number;
/** The number of indexed child variables.
The client can use this optional information to present the children in a paged UI and fetch them in chunks.
*/
indexedVariables?: number;
/** Optional memory reference for the variable if the variable represents executable code, such as a function pointer.
This attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request.
*/
memoryReference?: string;
}
Instance Attribute Summary collapse
-
#evaluateName ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string.
-
#indexedVariables ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string.
-
#memoryReference ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string.
-
#name ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string.
-
#namedVariables ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string.
-
#presentationHint ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string.
-
#type ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string.
-
#value ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string.
-
#variablesReference ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ Variable
constructor
A new instance of Variable.
Methods inherited from DSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ Variable
Returns a new instance of Variable.
4067 4068 4069 4070 |
# File 'lib/dsp/dsp_protocol.rb', line 4067 def initialize(initial_hash = nil) super @optional_method_names = %i[type presentationHint evaluateName namedVariables indexedVariables memoryReference] end |
Instance Attribute Details
#evaluateName ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string
4065 4066 4067 |
# File 'lib/dsp/dsp_protocol.rb', line 4065 def evaluateName @evaluateName end |
#indexedVariables ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string
4065 4066 4067 |
# File 'lib/dsp/dsp_protocol.rb', line 4065 def indexedVariables @indexedVariables end |
#memoryReference ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string
4065 4066 4067 |
# File 'lib/dsp/dsp_protocol.rb', line 4065 def memoryReference @memoryReference end |
#name ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string
4065 4066 4067 |
# File 'lib/dsp/dsp_protocol.rb', line 4065 def name @name end |
#namedVariables ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string
4065 4066 4067 |
# File 'lib/dsp/dsp_protocol.rb', line 4065 def namedVariables @namedVariables end |
#presentationHint ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string
4065 4066 4067 |
# File 'lib/dsp/dsp_protocol.rb', line 4065 def presentationHint @presentationHint end |
#type ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string
4065 4066 4067 |
# File 'lib/dsp/dsp_protocol.rb', line 4065 def type @type end |
#value ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string
4065 4066 4067 |
# File 'lib/dsp/dsp_protocol.rb', line 4065 def value @value end |
#variablesReference ⇒ Object
type: string # type: string # type: string # type: VariablePresentationHint # type: string # type: number # type: number # type: number # type: string
4065 4066 4067 |
# File 'lib/dsp/dsp_protocol.rb', line 4065 def variablesReference @variablesReference end |
Instance Method Details
#from_h!(value) ⇒ Object
4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 |
# File 'lib/dsp/dsp_protocol.rb', line 4072 def from_h!(value) value = {} if value.nil? self.name = value['name'] self.value = value['value'] self.type = value['type'] self.presentationHint = VariablePresentationHint.new(value['presentationHint']) unless value['presentationHint'].nil? self.evaluateName = value['evaluateName'] self.variablesReference = value['variablesReference'] self.namedVariables = value['namedVariables'] self.indexedVariables = value['indexedVariables'] self.memoryReference = value['memoryReference'] self end |