Sha256: 127fdf226276e2ba3e218b0ebb6101d37431bc83d036bd71c9bb4da2a2f0e49a
Contents?: true
Size: 1.41 KB
Versions: 103
Compression:
Stored size: 1.41 KB
Contents
module LanguageServer module Protocol module Interface # # Registration options specific to a notebook. # class NotebookDocumentSyncRegistrationOptions 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 # # The notebooks to be synced # # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] def notebook_selector attributes.fetch(:notebookSelector) end # # Whether save notification should be forwarded to # the server. Will only be honored if mode === `notebook`. # # @return [boolean] def save attributes.fetch(:save) end # # The id used to register the request. The id can be used to deregister # the request again. See also Registration#id. # # @return [string] def id attributes.fetch(:id) end attr_reader :attributes def to_hash attributes end def to_json(*args) to_hash.to_json(*args) end end end end end
Version data entries
103 entries across 103 versions & 13 rubygems