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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(frame_id:, stopped_location:) ⇒ InlineValueContext

Returns a new instance of InlineValueContext.



5
6
7
8
9
10
11
12
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 5

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

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

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



32
33
34
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 32

def attributes
  @attributes
end

Instance Method Details

#frame_idnumber

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

Returns:

  • (number)


18
19
20
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 18

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.

Returns:



28
29
30
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 28

def stopped_location
  attributes.fetch(:stoppedLocation)
end

#to_hashObject



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

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



38
39
40
# File 'lib/language_server/protocol/interface/inline_value_context.rb', line 38

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