class LanguageServer::Protocol::Interface::NotebookDocumentSyncRegistrationOptions

Registration options specific to a notebook.

Attributes

attributes[R]

Public Class Methods

new(notebook_selector:, save: nil, id: nil) click to toggle source
# File lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb, line 8
def initialize(notebook_selector:, save: nil, id: nil)
  @attributes = {}

  @attributes[:notebookSelector] = notebook_selector
  @attributes[:save] = save if save
  @attributes[:id] = id if id

  @attributes.freeze
end

Public Instance Methods

id() click to toggle source

The id used to register the request. The id can be used to deregister the request again. See also Registration#id.

@return [string]

# File lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb, line 40
def id
  attributes.fetch(:id)
end
notebook_selector() click to toggle source

The notebooks to be synced

@return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { …; }[]; })[]]

# File lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb, line 22
def notebook_selector
  attributes.fetch(:notebookSelector)
end
save() click to toggle source

Whether save notification should be forwarded to the server. Will only be honored if mode === ‘notebook`.

@return [boolean]

# File lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb, line 31
def save
  attributes.fetch(:save)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb, line 46
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb, line 50
def to_json(*args)
  to_hash.to_json(*args)
end