Class: LanguageServer::Protocol::Interface::InlineValueContext

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/inline_value_context.rb

Overview

Since:

  • 3.17.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(frame_id:, stopped_location:) ⇒ InlineValueContext

Returns a new instance of InlineValueContext.

Since:

  • 3.17.0



8
9
10
11
12
13
14
15
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 8

def initialize(frame_id:, stopped_location:)
  @attributes = {}

  @attributes[:frameId] = frame_id
  @attributes[:stoppedLocation] = stopped_location

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Since:

  • 3.17.0



34
35
36
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 34

def attributes
  @attributes
end

Instance Method Details

#frame_idinteger

The stack frame (as a DAP Id) where the execution has stopped.

Since:

  • 3.17.0



21
22
23
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 21

def frame_id
  attributes.fetch(:frameId)
end

#stopped_locationRange

The document range where execution has stopped. Typically the end position of the range denotes the line where the inline values are shown.

Since:

  • 3.17.0



30
31
32
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 30

def stopped_location
  attributes.fetch(:stoppedLocation)
end

#to_hashObject

Since:

  • 3.17.0



36
37
38
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 36

def to_hash
  attributes
end

#to_json(*args) ⇒ Object

Since:

  • 3.17.0



40
41
42
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 40

def to_json(*args)
  to_hash.to_json(*args)
end