Class: LanguageServer::Protocol::Interface::MarkdownClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::MarkdownClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/markdown_client_capabilities.rb
Overview
Client capabilities specific to the used markdown parser.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#allowed_tags ⇒ string[] | nil
A list of HTML tags that the client allows / supports in Markdown.
-
#initialize(parser:, version: nil, allowed_tags: nil) ⇒ MarkdownClientCapabilities
constructor
A new instance of MarkdownClientCapabilities.
-
#parser ⇒ string
The name of the parser.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#version ⇒ string | nil
The version of the parser.
Constructor Details
#initialize(parser:, version: nil, allowed_tags: nil) ⇒ MarkdownClientCapabilities
Returns a new instance of MarkdownClientCapabilities.
10 11 12 13 14 15 16 17 18 |
# File 'lib/language_server/protocol/interface/markdown_client_capabilities.rb', line 10 def initialize(parser:, version: nil, allowed_tags: nil) @attributes = {} @attributes[:parser] = parser @attributes[:version] = version if version @attributes[:allowedTags] = if @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
47 48 49 |
# File 'lib/language_server/protocol/interface/markdown_client_capabilities.rb', line 47 def attributes @attributes end |
Instance Method Details
#allowed_tags ⇒ string[] | nil
A list of HTML tags that the client allows / supports in Markdown.
43 44 45 |
# File 'lib/language_server/protocol/interface/markdown_client_capabilities.rb', line 43 def attributes.fetch(:allowedTags) end |
#parser ⇒ string
The name of the parser.
24 25 26 |
# File 'lib/language_server/protocol/interface/markdown_client_capabilities.rb', line 24 def parser attributes.fetch(:parser) end |
#to_hash ⇒ Object
49 50 51 |
# File 'lib/language_server/protocol/interface/markdown_client_capabilities.rb', line 49 def to_hash attributes end |
#to_json(*args) ⇒ Object
53 54 55 |
# File 'lib/language_server/protocol/interface/markdown_client_capabilities.rb', line 53 def to_json(*args) to_hash.to_json(*args) end |
#version ⇒ string | nil
The version of the parser.
32 33 34 |
# File 'lib/language_server/protocol/interface/markdown_client_capabilities.rb', line 32 def version attributes.fetch(:version) end |