Sha256: c2dcdd3bede31b410150ce7ab4d703d8fa8e65e5a66e95bd86292dcfe0ba01c9

Contents?: true

Size: 836 Bytes

Versions: 6

Compression:

Stored size: 836 Bytes

Contents

module LanguageServer
  module Protocol
    module Interface
      class DocumentFormattingParams
        def initialize(text_document:, options:)
          @attributes = {}

          @attributes[:textDocument] = text_document
          @attributes[:options] = options

          @attributes.freeze
        end

        #
        # The document to format.
        #
        # @return [TextDocumentIdentifier]
        def text_document
          attributes.fetch(:textDocument)
        end

        #
        # The format options.
        #
        # @return [FormattingOptions]
        def options
          attributes.fetch(:options)
        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

6 entries across 6 versions & 1 rubygems

Version Path
language_server-protocol-3.14.0.2 lib/language_server/protocol/interface/document_formatting_params.rb
language_server-protocol-3.14.0.1 lib/language_server/protocol/interface/document_formatting_params.rb
language_server-protocol-3.14.0.0 lib/language_server/protocol/interface/document_formatting_params.rb
language_server-protocol-3.12.0.0 lib/language_server/protocol/interface/document_formatting_params.rb
language_server-protocol-3.7.0.0 lib/language_server/protocol/interface/document_formatting_params.rb
language_server-protocol-0.5.0 lib/language_server/protocol/interface/document_formatting_params.rb