Class: LanguageServer::Protocol::Interface::RenameParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::RenameParams
- Defined in:
- lib/language_server/protocol/interface/rename_params.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(text_document:, position:, new_name:) ⇒ RenameParams
constructor
A new instance of RenameParams.
-
#new_name ⇒ string
The new name of the symbol.
-
#position ⇒ Position
The position at which this request was sent.
-
#text_document ⇒ TextDocumentIdentifier
The document to format.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(text_document:, position:, new_name:) ⇒ RenameParams
Returns a new instance of RenameParams.
5 6 7 8 9 10 11 12 13 |
# File 'lib/language_server/protocol/interface/rename_params.rb', line 5 def initialize(text_document:, position:, new_name:) @attributes = {} @attributes[:textDocument] = text_document @attributes[:position] = position @attributes[:newName] = new_name @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
41 42 43 |
# File 'lib/language_server/protocol/interface/rename_params.rb', line 41 def attributes @attributes end |
Instance Method Details
#new_name ⇒ string
The new name of the symbol. If the given name is not valid the request must return a [ResponseError](#ResponseError) with an appropriate message set.
37 38 39 |
# File 'lib/language_server/protocol/interface/rename_params.rb', line 37 def new_name attributes.fetch(:newName) end |
#position ⇒ Position
The position at which this request was sent.
27 28 29 |
# File 'lib/language_server/protocol/interface/rename_params.rb', line 27 def position attributes.fetch(:position) end |
#text_document ⇒ TextDocumentIdentifier
The document to format.
19 20 21 |
# File 'lib/language_server/protocol/interface/rename_params.rb', line 19 def text_document attributes.fetch(:textDocument) end |
#to_hash ⇒ Object
43 44 45 |
# File 'lib/language_server/protocol/interface/rename_params.rb', line 43 def to_hash attributes end |
#to_json(*args) ⇒ Object
47 48 49 |
# File 'lib/language_server/protocol/interface/rename_params.rb', line 47 def to_json(*args) to_hash.to_json(*args) end |