Class: LanguageServer::Protocol::Interface::PreviousResultId

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

Overview

A previous result id in a workspace pull request.

Since:

  • 3.17.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri:, value:) ⇒ PreviousResultId

Returns a new instance of PreviousResultId.

Since:

  • 3.17.0



10
11
12
13
14
15
16
17
# File 'lib/language_server/protocol/interface/previous_result_id.rb', line 10

def initialize(uri:, value:)
  @attributes = {}

  @attributes[:uri] = uri
  @attributes[:value] = value

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Since:

  • 3.17.0



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

def attributes
  @attributes
end

Instance Method Details

#to_hashObject

Since:

  • 3.17.0



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

def to_hash
  attributes
end

#to_json(*args) ⇒ Object

Since:

  • 3.17.0



42
43
44
# File 'lib/language_server/protocol/interface/previous_result_id.rb', line 42

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

#uriDocumentUri

The URI for which the client knows a result id.

Since:

  • 3.17.0



24
25
26
# File 'lib/language_server/protocol/interface/previous_result_id.rb', line 24

def uri
  attributes.fetch(:uri)
end

#valuestring

The value of the previous result id.

Since:

  • 3.17.0



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

def value
  attributes.fetch(:value)
end