Sha256: 0eca2d6b37e746dbe43482355b86a1a68178c277251e960f8bbe8fe36d320eb1

Contents?: true

Size: 1.69 KB

Versions: 104

Compression:

Stored size: 1.69 KB

Contents

module LanguageServer
  module Protocol
    module Interface
      #
      # A notebook document filter denotes a notebook document by
      # different properties.
      #
      class NotebookDocumentFilter
        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

        #
        # The type of the enclosing notebook.
        #
        # --- OR ---
        #
        # The type of the enclosing notebook.
        #
        # --- OR ---
        #
        # The type of the enclosing notebook.
        #
        # @return [string]
        def notebook_type
          attributes.fetch(:notebookType)
        end

        #
        # 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`.
        #
        # @return [string]
        def scheme
          attributes.fetch(:scheme)
        end

        #
        # A glob pattern.
        #
        # --- OR ---
        #
        # A glob pattern.
        #
        # --- OR ---
        #
        # A glob pattern.
        #
        # @return [string]
        def pattern
          attributes.fetch(:pattern)
        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

104 entries across 104 versions & 13 rubygems

Version Path
harbr-0.1.64 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_filter.rb
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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.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_filter.rb