Class: LanguageServer::Protocol::Interface::ApplyWorkspaceEditResponse
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::ApplyWorkspaceEditResponse
- Defined in:
- lib/language_server/protocol/interface/apply_workspace_edit_response.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#applied ⇒ boolean
Indicates whether the edit was applied or not.
-
#failure_reason ⇒ string
An optional textual description for why the edit was not applied.
-
#initialize(applied:, failure_reason: nil) ⇒ ApplyWorkspaceEditResponse
constructor
A new instance of ApplyWorkspaceEditResponse.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(applied:, failure_reason: nil) ⇒ ApplyWorkspaceEditResponse
Returns a new instance of ApplyWorkspaceEditResponse.
5 6 7 8 9 10 11 12 |
# File 'lib/language_server/protocol/interface/apply_workspace_edit_response.rb', line 5 def initialize(applied:, failure_reason: nil) @attributes = {} @attributes[:applied] = applied @attributes[:failureReason] = failure_reason if failure_reason @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
33 34 35 |
# File 'lib/language_server/protocol/interface/apply_workspace_edit_response.rb', line 33 def attributes @attributes end |
Instance Method Details
#applied ⇒ boolean
Indicates whether the edit was applied or not.
18 19 20 |
# File 'lib/language_server/protocol/interface/apply_workspace_edit_response.rb', line 18 def applied attributes.fetch(:applied) end |
#failure_reason ⇒ string
An optional textual description for why the edit was not applied. This may be used may be used by the server for diagnostic logging or to provide a suitable error for a request that triggered the edit.
29 30 31 |
# File 'lib/language_server/protocol/interface/apply_workspace_edit_response.rb', line 29 def failure_reason attributes.fetch(:failureReason) end |
#to_hash ⇒ Object
35 36 37 |
# File 'lib/language_server/protocol/interface/apply_workspace_edit_response.rb', line 35 def to_hash attributes end |
#to_json(*args) ⇒ Object
39 40 41 |
# File 'lib/language_server/protocol/interface/apply_workspace_edit_response.rb', line 39 def to_json(*args) to_hash.to_json(*args) end |