Class: DSP::SetBreakpointsArguments

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

Overview

interface SetBreakpointsArguments {

    /** The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified. */
    source: Source;
    /** The code locations of the breakpoints. */
    breakpoints?: SourceBreakpoint[];
    /** Deprecated: The code locations of the breakpoints. */
    lines?: number[];
    /** A value of true indicates that the underlying source has been modified which results in new breakpoint locations. */
    sourceModified?: boolean;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ SetBreakpointsArguments

Returns a new instance of SetBreakpointsArguments.



1410
1411
1412
1413
# File 'lib/dsp/dsp_protocol.rb', line 1410

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[breakpoints lines sourceModified]
end

Instance Attribute Details

#breakpointsObject

type: Source # type: SourceBreakpoint[] # type: number[] # type: boolean



1408
1409
1410
# File 'lib/dsp/dsp_protocol.rb', line 1408

def breakpoints
  @breakpoints
end

#linesObject

type: Source # type: SourceBreakpoint[] # type: number[] # type: boolean



1408
1409
1410
# File 'lib/dsp/dsp_protocol.rb', line 1408

def lines
  @lines
end

#sourceObject

type: Source # type: SourceBreakpoint[] # type: number[] # type: boolean



1408
1409
1410
# File 'lib/dsp/dsp_protocol.rb', line 1408

def source
  @source
end

#sourceModifiedObject

type: Source # type: SourceBreakpoint[] # type: number[] # type: boolean



1408
1409
1410
# File 'lib/dsp/dsp_protocol.rb', line 1408

def sourceModified
  @sourceModified
end

Instance Method Details

#from_h!(value) ⇒ Object



1415
1416
1417
1418
1419
1420
1421
1422
# File 'lib/dsp/dsp_protocol.rb', line 1415

def from_h!(value)
  value = {} if value.nil?
  self.source = Source.new(value['source']) unless value['source'].nil?
  self.breakpoints = to_typed_aray(value['breakpoints'], SourceBreakpoint)
  self.lines = value['lines'].map { |val| val } unless value['lines'].nil?
  self.sourceModified = value['sourceModified'] # Unknown type
  self
end