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.2.5 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.2.4 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.2.3 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.2.2 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.2.1 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.2.0 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.99 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.98 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.97 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.96 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.95 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.94 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.93 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.91 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.90 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.89 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.88 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.87 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.86 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.85 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/notebook_document_filter.rb