Class: LanguageServer::Protocol::Interface::DeleteFile
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::DeleteFile
- Defined in:
- lib/language_server/protocol/interface/delete_file.rb
Overview
Delete file operation
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#annotation_id ⇒ string
An optional annotation identifier describing the operation.
-
#initialize(kind:, uri:, options: nil, annotation_id: nil) ⇒ DeleteFile
constructor
A new instance of DeleteFile.
-
#kind ⇒ "delete"
A delete.
-
#options ⇒ DeleteFileOptions
Delete options.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#uri ⇒ string
The file to delete.
Constructor Details
#initialize(kind:, uri:, options: nil, annotation_id: nil) ⇒ DeleteFile
Returns a new instance of DeleteFile.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/delete_file.rb', line 8 def initialize(kind:, uri:, options: nil, annotation_id: nil) @attributes = {} @attributes[:kind] = kind @attributes[:uri] = uri @attributes[:options] = if @attributes[:annotationId] = annotation_id if annotation_id @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
51 52 53 |
# File 'lib/language_server/protocol/interface/delete_file.rb', line 51 def attributes @attributes end |
Instance Method Details
#annotation_id ⇒ string
An optional annotation identifier describing the operation.
47 48 49 |
# File 'lib/language_server/protocol/interface/delete_file.rb', line 47 def annotation_id attributes.fetch(:annotationId) end |
#kind ⇒ "delete"
A delete
23 24 25 |
# File 'lib/language_server/protocol/interface/delete_file.rb', line 23 def kind attributes.fetch(:kind) end |
#options ⇒ DeleteFileOptions
Delete options.
39 40 41 |
# File 'lib/language_server/protocol/interface/delete_file.rb', line 39 def attributes.fetch(:options) end |
#to_hash ⇒ Object
53 54 55 |
# File 'lib/language_server/protocol/interface/delete_file.rb', line 53 def to_hash attributes end |
#to_json(*args) ⇒ Object
57 58 59 |
# File 'lib/language_server/protocol/interface/delete_file.rb', line 57 def to_json(*args) to_hash.to_json(*args) end |
#uri ⇒ string
The file to delete.
31 32 33 |
# File 'lib/language_server/protocol/interface/delete_file.rb', line 31 def uri attributes.fetch(:uri) end |