Class: LanguageServer::Protocol::Interface::CodeActionParams
- Inherits:
-
PartialResultParams
- Object
- PartialResultParams
- LanguageServer::Protocol::Interface::CodeActionParams
- Defined in:
- lib/language_server/protocol/interface/code_action_params.rb
Overview
Params for the CodeActionRequest
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#context ⇒ CodeActionContext
Context carrying additional information.
-
#initialize(partial_result_token: nil, text_document:, range:, context:) ⇒ CodeActionParams
constructor
A new instance of CodeActionParams.
-
#range ⇒ Range
The range for which the command was invoked.
-
#text_document ⇒ TextDocumentIdentifier
The document in which the command was invoked.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Methods inherited from PartialResultParams
Constructor Details
#initialize(partial_result_token: nil, text_document:, range:, context:) ⇒ CodeActionParams
Returns a new instance of CodeActionParams.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/code_action_params.rb', line 8 def initialize(partial_result_token: nil, text_document:, range:, context:) @attributes = {} @attributes[:partialResultToken] = partial_result_token if partial_result_token @attributes[:textDocument] = text_document @attributes[:range] = range @attributes[:context] = context @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
43 44 45 |
# File 'lib/language_server/protocol/interface/code_action_params.rb', line 43 def attributes @attributes end |
Instance Method Details
#context ⇒ CodeActionContext
Context carrying additional information.
39 40 41 |
# File 'lib/language_server/protocol/interface/code_action_params.rb', line 39 def context attributes.fetch(:context) end |
#range ⇒ Range
The range for which the command was invoked.
31 32 33 |
# File 'lib/language_server/protocol/interface/code_action_params.rb', line 31 def range attributes.fetch(:range) end |
#text_document ⇒ TextDocumentIdentifier
The document in which the command was invoked.
23 24 25 |
# File 'lib/language_server/protocol/interface/code_action_params.rb', line 23 def text_document attributes.fetch(:textDocument) end |
#to_hash ⇒ Object
45 46 47 |
# File 'lib/language_server/protocol/interface/code_action_params.rb', line 45 def to_hash attributes end |
#to_json(*args) ⇒ Object
49 50 51 |
# File 'lib/language_server/protocol/interface/code_action_params.rb', line 49 def to_json(*args) to_hash.to_json(*args) end |