class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingOptions
Attributes
attributes[R]
Public Class Methods
new(first_trigger_character:, more_trigger_character: nil)
click to toggle source
# File lib/language_server/protocol/interface/document_on_type_formatting_options.rb, line 5 def initialize(first_trigger_character:, more_trigger_character: nil) @attributes = {} @attributes[:firstTriggerCharacter] = first_trigger_character @attributes[:moreTriggerCharacter] = more_trigger_character if more_trigger_character @attributes.freeze end
Public Instance Methods
first_trigger_character()
click to toggle source
A character on which formatting should be triggered, like `}`.
@return [string]
# File lib/language_server/protocol/interface/document_on_type_formatting_options.rb, line 18 def first_trigger_character attributes.fetch(:firstTriggerCharacter) end
more_trigger_character()
click to toggle source
More trigger characters.
@return [string
# File lib/language_server/protocol/interface/document_on_type_formatting_options.rb, line 26 def more_trigger_character attributes.fetch(:moreTriggerCharacter) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/document_on_type_formatting_options.rb, line 32 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/document_on_type_formatting_options.rb, line 36 def to_json(*args) to_hash.to_json(*args) end