Sha256: 7dfb13c635f09ee90b5610aa95e781f570061c5e443cbc9e57671408914d8713

Contents?: true

Size: 1013 Bytes

Versions: 107

Compression:

Stored size: 1013 Bytes

Contents

module LanguageServer
  module Protocol
    module Interface
      class DocumentRangeFormattingRegistrationOptions
        def initialize(document_selector:, work_done_progress: nil)
          @attributes = {}

          @attributes[:documentSelector] = document_selector
          @attributes[:workDoneProgress] = work_done_progress if work_done_progress

          @attributes.freeze
        end

        #
        # A document selector to identify the scope of the registration. If set to
        # null the document selector provided on the client side will be used.
        #
        # @return [DocumentSelector]
        def document_selector
          attributes.fetch(:documentSelector)
        end

        # @return [boolean]
        def work_done_progress
          attributes.fetch(:workDoneProgress)
        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

107 entries across 107 versions & 13 rubygems

Version Path
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb
language_server-protocol-3.17.0.3 lib/language_server/protocol/interface/document_range_formatting_registration_options.rb
language_server-protocol-3.17.0.2 lib/language_server/protocol/interface/document_range_formatting_registration_options.rb
language_server-protocol-3.17.0.1 lib/language_server/protocol/interface/document_range_formatting_registration_options.rb
language_server-protocol-3.16.0.3 lib/language_server/protocol/interface/document_range_formatting_registration_options.rb
language_server-protocol-3.16.0.2 lib/language_server/protocol/interface/document_range_formatting_registration_options.rb
language_server-protocol-3.16.0.1 lib/language_server/protocol/interface/document_range_formatting_registration_options.rb