Class: DSP::EvaluateArguments

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

Overview

interface EvaluateArguments { /** The expression to evaluate. / expression: string; /* Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. / frameId?: number; /* The context in which the evaluate request is run. Values: 'watch': evaluate is run in a watch. 'repl': evaluate is run from REPL console. 'hover': evaluate is run from a data hover. 'clipboard': evaluate is run to generate the value that will be stored in the clipboard. The attribute is only honored by a debug adapter if the capability 'supportsClipboardContext' is true. etc. / context?: string; /* Specifies details on how to format the Evaluate result. 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) ⇒ EvaluateArguments

Returns a new instance of EvaluateArguments.



2921
2922
2923
2924
# File 'lib/dsp/dsp_protocol.rb', line 2921

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

Instance Attribute Details

#contextObject

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



2919
2920
2921
# File 'lib/dsp/dsp_protocol.rb', line 2919

def context
  @context
end

#expressionObject

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



2919
2920
2921
# File 'lib/dsp/dsp_protocol.rb', line 2919

def expression
  @expression
end

#formatObject

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



2919
2920
2921
# File 'lib/dsp/dsp_protocol.rb', line 2919

def format
  @format
end

#frameIdObject

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



2919
2920
2921
# File 'lib/dsp/dsp_protocol.rb', line 2919

def frameId
  @frameId
end

Instance Method Details

#from_h!(value) ⇒ Object



2926
2927
2928
2929
2930
2931
2932
2933
# File 'lib/dsp/dsp_protocol.rb', line 2926

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