Class: LanguageServer::Protocol::Interface::NotebookDocumentFilter
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::NotebookDocumentFilter
- Defined in:
- lib/language_server/protocol/interface/notebook_document_filter.rb
Overview
A notebook document filter denotes a notebook document by different properties.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(notebook_type: nil, scheme: nil, pattern: nil) ⇒ NotebookDocumentFilter
constructor
A new instance of NotebookDocumentFilter.
-
#notebook_type ⇒ string
The type of the enclosing notebook.
-
#pattern ⇒ string
A glob pattern.
-
#scheme ⇒ string
A Uri [scheme](#Uri.scheme), like ‘file` or `untitled`.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(notebook_type: nil, scheme: nil, pattern: nil) ⇒ NotebookDocumentFilter
Returns a new instance of NotebookDocumentFilter.
9 10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/notebook_document_filter.rb', line 9 def initialize(notebook_type: nil, scheme: nil, pattern: nil) @attributes = {} @attributes[:notebookType] = notebook_type if notebook_type @attributes[:scheme] = scheme if scheme @attributes[:pattern] = pattern if pattern @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
67 68 69 |
# File 'lib/language_server/protocol/interface/notebook_document_filter.rb', line 67 def attributes @attributes end |
Instance Method Details
#notebook_type ⇒ string
The type of the enclosing notebook.
— OR —
The type of the enclosing notebook.
— OR —
The type of the enclosing notebook.
31 32 33 |
# File 'lib/language_server/protocol/interface/notebook_document_filter.rb', line 31 def notebook_type attributes.fetch(:notebookType) end |
#pattern ⇒ string
A glob pattern.
— OR —
A glob pattern.
— OR —
A glob pattern.
63 64 65 |
# File 'lib/language_server/protocol/interface/notebook_document_filter.rb', line 63 def pattern attributes.fetch(:pattern) end |
#scheme ⇒ string
A Uri [scheme](#Uri.scheme), like ‘file` or `untitled`.
— OR —
A Uri [scheme](#Uri.scheme), like ‘file` or `untitled`.
— OR —
A Uri [scheme](#Uri.scheme), like ‘file` or `untitled`.
47 48 49 |
# File 'lib/language_server/protocol/interface/notebook_document_filter.rb', line 47 def scheme attributes.fetch(:scheme) end |
#to_hash ⇒ Object
69 70 71 |
# File 'lib/language_server/protocol/interface/notebook_document_filter.rb', line 69 def to_hash attributes end |
#to_json(*args) ⇒ Object
73 74 75 |
# File 'lib/language_server/protocol/interface/notebook_document_filter.rb', line 73 def to_json(*args) to_hash.to_json(*args) end |