Sha256: 46ba214cde0359db27c7cd5474b20c7c781a8d516116308d9e965a8ed302dc8e

Contents?: true

Size: 1014 Bytes

Versions: 3

Compression:

Stored size: 1014 Bytes

Contents

module LanguageServer
  module Protocol
    module Interface
      class WorkspaceSymbolClientCapabilities
        def initialize(dynamic_registration: nil, symbol_kind: nil)
          @attributes = {}

          @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
          @attributes[:symbolKind] = symbol_kind if symbol_kind

          @attributes.freeze
        end

        #
        # Symbol request supports dynamic registration.
        #
        # @return [boolean]
        def dynamic_registration
          attributes.fetch(:dynamicRegistration)
        end

        #
        # Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
        #
        # @return [{ valueSet?: any[]; }]
        def symbol_kind
          attributes.fetch(:symbolKind)
        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

3 entries across 3 versions & 1 rubygems

Version Path
language_server-protocol-3.15.0.2 lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb
language_server-protocol-3.15.0.1 lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb
language_server-protocol-3.15.0.0 lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb