Sha256: 71c7ef97f142b748d91cec840c46b8411765e840826431d4ab53cb0c094c7f7b

Contents?: true

Size: 746 Bytes

Versions: 7

Compression:

Stored size: 746 Bytes

Contents

module LanguageServer
  module Protocol
    module Interfaces
      #
      # Descibe options to be used when registered for text document change events.
      #
      class TextDocumentChangeRegistrationOptions
        def initialize(sync_kind:)
          @attributes = {}

          @attributes[:syncKind] = sync_kind

          @attributes.freeze
        end

        #
        # How documents are synced to the server. See TextDocumentSyncKind.Full
        # and TextDocumentSyncKindIncremental.
        #
        # @return [number]
        def sync_kind
          attributes.fetch(:syncKind)
        end

        attr_reader :attributes

        def to_json(*args)
          attributes.to_json(*args)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
language_server-protocol-0.2.0 lib/language_server/protocol/interfaces/text_document_change_registration_options.rb
language_server-protocol-0.1.0 lib/language_server/protocol/interfaces/text_document_change_registration_options.rb
language_server-0.4.0 lib/language_server/protocol/interfaces/text_document_change_registration_options.rb
language_server-0.3.1 lib/language_server/protocol/interfaces/text_document_change_registration_options.rb
language_server-0.3.0 lib/language_server/protocol/interfaces/text_document_change_registration_options.rb
language_server-0.2.0 lib/language_server/protocol/interfaces/text_document_change_registration_options.rb
language_server-0.1.0 lib/language_server/protocol/interfaces/text_document_change_registration_options.rb