Class: LanguageServer::Protocol::Interface::RenameFile
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::RenameFile
- Defined in:
- lib/language_server/protocol/interface/rename_file.rb
Overview
Rename file operation
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(kind:, old_uri:, new_uri:, options: nil) ⇒ RenameFile
constructor
A new instance of RenameFile.
-
#kind ⇒ "rename"
A rename.
-
#new_uri ⇒ string
The new location.
-
#old_uri ⇒ string
The old (existing) location.
-
#options ⇒ RenameFileOptions
Rename options.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(kind:, old_uri:, new_uri:, options: nil) ⇒ RenameFile
Returns a new instance of RenameFile.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/rename_file.rb', line 8 def initialize(kind:, old_uri:, new_uri:, options: nil) @attributes = {} @attributes[:kind] = kind @attributes[:oldUri] = old_uri @attributes[:newUri] = new_uri @attributes[:options] = if @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
51 52 53 |
# File 'lib/language_server/protocol/interface/rename_file.rb', line 51 def attributes @attributes end |
Instance Method Details
#kind ⇒ "rename"
A rename
23 24 25 |
# File 'lib/language_server/protocol/interface/rename_file.rb', line 23 def kind attributes.fetch(:kind) end |
#new_uri ⇒ string
The new location.
39 40 41 |
# File 'lib/language_server/protocol/interface/rename_file.rb', line 39 def new_uri attributes.fetch(:newUri) end |
#old_uri ⇒ string
The old (existing) location.
31 32 33 |
# File 'lib/language_server/protocol/interface/rename_file.rb', line 31 def old_uri attributes.fetch(:oldUri) end |
#options ⇒ RenameFileOptions
Rename options.
47 48 49 |
# File 'lib/language_server/protocol/interface/rename_file.rb', line 47 def attributes.fetch(:options) end |
#to_hash ⇒ Object
53 54 55 |
# File 'lib/language_server/protocol/interface/rename_file.rb', line 53 def to_hash attributes end |
#to_json(*args) ⇒ Object
57 58 59 |
# File 'lib/language_server/protocol/interface/rename_file.rb', line 57 def to_json(*args) to_hash.to_json(*args) end |