Class: DSP::GotoTarget

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

Overview

interface GotoTarget {

    /** Unique identifier for a goto target. This is used in the goto request. */
    id: number;
    /** The name of the goto target (shown in the UI). */
    label: string;
    /** The line of the goto target. */
    line: number;
    /** An optional column of the goto target. */
    column?: number;
    /** An optional end line of the range covered by the goto target. */
    endLine?: number;
    /** An optional end column of the range covered by the goto target. */
    endColumn?: number;
    /** Optional memory reference for the instruction pointer value represented by this target. */
    instructionPointerReference?: string;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ GotoTarget

Returns a new instance of GotoTarget.



4346
4347
4348
4349
# File 'lib/dsp/dsp_protocol.rb', line 4346

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[column endLine endColumn instructionPointerReference]
end

Instance Attribute Details

#columnObject

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



4344
4345
4346
# File 'lib/dsp/dsp_protocol.rb', line 4344

def column
  @column
end

#endColumnObject

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



4344
4345
4346
# File 'lib/dsp/dsp_protocol.rb', line 4344

def endColumn
  @endColumn
end

#endLineObject

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



4344
4345
4346
# File 'lib/dsp/dsp_protocol.rb', line 4344

def endLine
  @endLine
end

#idObject

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



4344
4345
4346
# File 'lib/dsp/dsp_protocol.rb', line 4344

def id
  @id
end

#instructionPointerReferenceObject

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



4344
4345
4346
# File 'lib/dsp/dsp_protocol.rb', line 4344

def instructionPointerReference
  @instructionPointerReference
end

#labelObject

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



4344
4345
4346
# File 'lib/dsp/dsp_protocol.rb', line 4344

def label
  @label
end

#lineObject

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



4344
4345
4346
# File 'lib/dsp/dsp_protocol.rb', line 4344

def line
  @line
end

Instance Method Details

#from_h!(value) ⇒ Object



4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
# File 'lib/dsp/dsp_protocol.rb', line 4351

def from_h!(value)
  value = {} if value.nil?
  self.id = value['id']
  self.label = value['label']
  self.line = value['line']
  self.column = value['column']
  self.endLine = value['endLine']
  self.endColumn = value['endColumn']
  self.instructionPointerReference = value['instructionPointerReference']
  self
end