Class: DSP::Breakpoint

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

Overview

interface Breakpoint {

    /** An optional identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. */
    id?: number;
    /** If true breakpoint could be set (but not necessarily at the desired location). */
    verified: boolean;
    /** An optional message about the state of the breakpoint.
        This is shown to the user and can be used to explain why a breakpoint could not be verified.
    */
    message?: string;
    /** The source where the breakpoint is located. */
    source?: Source;
    /** The start line of the actual range covered by the breakpoint. */
    line?: number;
    /** An optional start column of the actual range covered by the breakpoint. */
    column?: number;
    /** An optional end line of the actual range covered by the breakpoint. */
    endLine?: number;
    /** An optional end column of the actual range covered by the breakpoint.
        If no end line is given, then the end column is assumed to be in the start line.
    */
    endColumn?: number;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ Breakpoint

Returns a new instance of Breakpoint.



4291
4292
4293
4294
# File 'lib/dsp/dsp_protocol.rb', line 4291

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[id message source line column endLine endColumn]
end

Instance Attribute Details

#columnObject

type: number # type: boolean # type: string # type: Source # type: number # type: number # type: number # type: number



4289
4290
4291
# File 'lib/dsp/dsp_protocol.rb', line 4289

def column
  @column
end

#endColumnObject

type: number # type: boolean # type: string # type: Source # type: number # type: number # type: number # type: number



4289
4290
4291
# File 'lib/dsp/dsp_protocol.rb', line 4289

def endColumn
  @endColumn
end

#endLineObject

type: number # type: boolean # type: string # type: Source # type: number # type: number # type: number # type: number



4289
4290
4291
# File 'lib/dsp/dsp_protocol.rb', line 4289

def endLine
  @endLine
end

#idObject

type: number # type: boolean # type: string # type: Source # type: number # type: number # type: number # type: number



4289
4290
4291
# File 'lib/dsp/dsp_protocol.rb', line 4289

def id
  @id
end

#lineObject

type: number # type: boolean # type: string # type: Source # type: number # type: number # type: number # type: number



4289
4290
4291
# File 'lib/dsp/dsp_protocol.rb', line 4289

def line
  @line
end

#messageObject

type: number # type: boolean # type: string # type: Source # type: number # type: number # type: number # type: number



4289
4290
4291
# File 'lib/dsp/dsp_protocol.rb', line 4289

def message
  @message
end

#sourceObject

type: number # type: boolean # type: string # type: Source # type: number # type: number # type: number # type: number



4289
4290
4291
# File 'lib/dsp/dsp_protocol.rb', line 4289

def source
  @source
end

#verifiedObject

type: number # type: boolean # type: string # type: Source # type: number # type: number # type: number # type: number



4289
4290
4291
# File 'lib/dsp/dsp_protocol.rb', line 4289

def verified
  @verified
end

Instance Method Details

#from_h!(value) ⇒ Object



4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
# File 'lib/dsp/dsp_protocol.rb', line 4296

def from_h!(value)
  value = {} if value.nil?
  self.id = value['id']
  self.verified = value['verified'] # Unknown type
  self.message = value['message']
  self.source = Source.new(value['source']) unless value['source'].nil?
  self.line = value['line']
  self.column = value['column']
  self.endLine = value['endLine']
  self.endColumn = value['endColumn']
  self
end