Sha256: d7cbdeaabc744cc9e65ad0cbf92007fa9d6cdc96fd282d6664bbe2c4b7ecd05e

Contents?: true

Size: 896 Bytes

Versions: 107

Compression:

Stored size: 896 Bytes

Contents

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

          @attributes[:workDoneProgress] = work_done_progress if work_done_progress
          @attributes[:resolveProvider] = resolve_provider if resolve_provider

          @attributes.freeze
        end

        # @return [boolean]
        def work_done_progress
          attributes.fetch(:workDoneProgress)
        end

        #
        # Document links have a resolve provider as well.
        #
        # @return [boolean]
        def resolve_provider
          attributes.fetch(:resolveProvider)
        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_link_options.rb
language_server-protocol-3.17.0.3 lib/language_server/protocol/interface/document_link_options.rb
language_server-protocol-3.17.0.2 lib/language_server/protocol/interface/document_link_options.rb
language_server-protocol-3.17.0.1 lib/language_server/protocol/interface/document_link_options.rb
language_server-protocol-3.16.0.3 lib/language_server/protocol/interface/document_link_options.rb
language_server-protocol-3.16.0.2 lib/language_server/protocol/interface/document_link_options.rb
language_server-protocol-3.16.0.1 lib/language_server/protocol/interface/document_link_options.rb