Sha256: 4354730baf00f712385cf62d061a376d9e2fae75f7eb1952506a40d59ae48069

Contents?: true

Size: 759 Bytes

Versions: 3

Compression:

Stored size: 759 Bytes

Contents

module LanguageServer
  module Protocol
    module Interface
      class PartialResultParams
        def initialize(partial_result_token: nil)
          @attributes = {}

          @attributes[:partialResultToken] = partial_result_token if partial_result_token

          @attributes.freeze
        end

        #
        # An optional token that a server can use to report partial results (e.g. streaming) to
        # the client.
        #
        # @return [string | number]
        def partial_result_token
          attributes.fetch(:partialResultToken)
        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/partial_result_params.rb
language_server-protocol-3.15.0.1 lib/language_server/protocol/interface/partial_result_params.rb
language_server-protocol-3.15.0.0 lib/language_server/protocol/interface/partial_result_params.rb