Class: LanguageServer::Protocol::Interface::NotebookCellTextDocumentFilter
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::NotebookCellTextDocumentFilter
- Defined in:
- lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb
Overview
A notebook cell text document filter denotes a cell text document by different properties.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(notebook:, language: nil) ⇒ NotebookCellTextDocumentFilter
constructor
A new instance of NotebookCellTextDocumentFilter.
-
#language ⇒ string | nil
A language id like
python. -
#notebook ⇒ string | NotebookDocumentFilter
A filter that matches against the notebook containing the notebook cell.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(notebook:, language: nil) ⇒ NotebookCellTextDocumentFilter
Returns a new instance of NotebookCellTextDocumentFilter.
11 12 13 14 15 16 17 18 |
# File 'lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb', line 11 def initialize(notebook:, language: nil) @attributes = {} @attributes[:notebook] = notebook @attributes[:language] = language if language @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
42 43 44 |
# File 'lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb', line 42 def attributes @attributes end |
Instance Method Details
#language ⇒ string | nil
A language id like python.
Will be matched against the language id of the notebook cell document. ‘*’ matches every language.
38 39 40 |
# File 'lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb', line 38 def language attributes.fetch(:language) end |
#notebook ⇒ string | NotebookDocumentFilter
A filter that matches against the notebook containing the notebook cell. If a string value is provided it matches against the notebook type. ‘*’ matches every notebook.
27 28 29 |
# File 'lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb', line 27 def notebook attributes.fetch(:notebook) end |
#to_hash ⇒ Object
44 45 46 |
# File 'lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb', line 44 def to_hash attributes end |
#to_json(*args) ⇒ Object
48 49 50 |
# File 'lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb', line 48 def to_json(*args) to_hash.to_json(*args) end |