Class: DSP::Scope

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

Overview

interface Scope {

    /** Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. */
    name: string;
    /** An optional hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.
        Values:
        'arguments': Scope contains method arguments.
        'locals': Scope contains local variables.
        'registers': Scope contains registers. Only a single 'registers' scope should be returned from a 'scopes' request.
        etc.
    */
    presentationHint?: string;
    /** The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest. */
    variablesReference: number;
    /** The number of named variables in this scope.
        The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
    */
    namedVariables?: number;
    /** The number of indexed variables in this scope.
        The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
    */
    indexedVariables?: number;
    /** If true, the number of variables in this scope is large or expensive to retrieve. */
    expensive: boolean;
    /** Optional source for this scope. */
    source?: Source;
    /** Optional start line of the range covered by this scope. */
    line?: number;
    /** Optional start column of the range covered by this scope. */
    column?: number;
    /** Optional end line of the range covered by this scope. */
    endLine?: number;
    /** Optional end column of the range covered by this scope. */
    endColumn?: number;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ Scope

Returns a new instance of Scope.



4014
4015
4016
4017
# File 'lib/dsp/dsp_protocol.rb', line 4014

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

Instance Attribute Details

#columnObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def column
  @column
end

#endColumnObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def endColumn
  @endColumn
end

#endLineObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def endLine
  @endLine
end

#expensiveObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def expensive
  @expensive
end

#indexedVariablesObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def indexedVariables
  @indexedVariables
end

#lineObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def line
  @line
end

#nameObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def name
  @name
end

#namedVariablesObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def namedVariables
  @namedVariables
end

#presentationHintObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def presentationHint
  @presentationHint
end

#sourceObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def source
  @source
end

#variablesReferenceObject

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



4012
4013
4014
# File 'lib/dsp/dsp_protocol.rb', line 4012

def variablesReference
  @variablesReference
end

Instance Method Details

#from_h!(value) ⇒ Object



4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
# File 'lib/dsp/dsp_protocol.rb', line 4019

def from_h!(value)
  value = {} if value.nil?
  self.name = value['name']
  self.presentationHint = value['presentationHint']
  self.variablesReference = value['variablesReference']
  self.namedVariables = value['namedVariables']
  self.indexedVariables = value['indexedVariables']
  self.expensive = value['expensive'] # Unknown type
  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