Class: LanguageServer::Protocol::Interface::CompletionOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::CompletionOptions
- Defined in:
- lib/language_server/protocol/interface/completion_options.rb
Overview
Completion options.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(resolve_provider: nil, trigger_characters: nil) ⇒ CompletionOptions
constructor
A new instance of CompletionOptions.
-
#resolve_provider ⇒ boolean
The server provides support to resolve additional information for a completion item.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#trigger_characters ⇒ string[]
The characters that trigger completion automatically.
Constructor Details
#initialize(resolve_provider: nil, trigger_characters: nil) ⇒ CompletionOptions
Returns a new instance of CompletionOptions.
8 9 10 11 12 13 14 15 |
# File 'lib/language_server/protocol/interface/completion_options.rb', line 8 def initialize(resolve_provider: nil, trigger_characters: nil) @attributes = {} @attributes[:resolveProvider] = resolve_provider if resolve_provider @attributes[:triggerCharacters] = trigger_characters if trigger_characters @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
34 35 36 |
# File 'lib/language_server/protocol/interface/completion_options.rb', line 34 def attributes @attributes end |
Instance Method Details
#resolve_provider ⇒ boolean
The server provides support to resolve additional information for a completion item.
22 23 24 |
# File 'lib/language_server/protocol/interface/completion_options.rb', line 22 def resolve_provider attributes.fetch(:resolveProvider) end |
#to_hash ⇒ Object
36 37 38 |
# File 'lib/language_server/protocol/interface/completion_options.rb', line 36 def to_hash attributes end |
#to_json(*args) ⇒ Object
40 41 42 |
# File 'lib/language_server/protocol/interface/completion_options.rb', line 40 def to_json(*args) to_hash.to_json(*args) end |
#trigger_characters ⇒ string[]
The characters that trigger completion automatically.
30 31 32 |
# File 'lib/language_server/protocol/interface/completion_options.rb', line 30 def trigger_characters attributes.fetch(:triggerCharacters) end |