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

Version Path
harbr-0.1.63 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.62 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.61 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.60 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.59 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.58 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.57 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.56 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.55 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.54 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.53 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.52 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.50 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.49 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.48 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.47 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.46 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.45 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.44 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb
harbr-0.1.43 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb