Class: LanguageServer::Protocol::Interface::CodeActionOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::CodeActionOptions
- Defined in:
- lib/language_server/protocol/interface/code_action_options.rb
Overview
Code Action options.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#code_action_kinds ⇒ string[]
CodeActionKinds that this server may return.
-
#initialize(code_action_kinds: nil) ⇒ CodeActionOptions
constructor
A new instance of CodeActionOptions.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(code_action_kinds: nil) ⇒ CodeActionOptions
Returns a new instance of CodeActionOptions.
8 9 10 11 12 13 14 |
# File 'lib/language_server/protocol/interface/code_action_options.rb', line 8 def initialize(code_action_kinds: nil) @attributes = {} @attributes[:codeActionKinds] = code_action_kinds if code_action_kinds @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
27 28 29 |
# File 'lib/language_server/protocol/interface/code_action_options.rb', line 27 def attributes @attributes end |
Instance Method Details
#code_action_kinds ⇒ string[]
CodeActionKinds that this server may return.
The list of kinds may be generic, such as ‘CodeActionKind.Refactor`, or the server may list out every specific kind they provide.
23 24 25 |
# File 'lib/language_server/protocol/interface/code_action_options.rb', line 23 def code_action_kinds attributes.fetch(:codeActionKinds) end |
#to_hash ⇒ Object
29 30 31 |
# File 'lib/language_server/protocol/interface/code_action_options.rb', line 29 def to_hash attributes end |
#to_json(*args) ⇒ Object
33 34 35 |
# File 'lib/language_server/protocol/interface/code_action_options.rb', line 33 def to_json(*args) to_hash.to_json(*args) end |