Sha256: 45e46330e4a2c3eb6418063cc2bc522ea1eea29f6bb27798622dae5a571b94d0

Contents?: true

Size: 716 Bytes

Versions: 4

Compression:

Stored size: 716 Bytes

Contents

module LanguageServer
  module Protocol
    module Interface
      #
      # Document link options.
      #
      class DocumentLinkOptions
        def initialize(resolve_provider: nil)
          @attributes = {}

          @attributes[:resolveProvider] = resolve_provider if resolve_provider

          @attributes.freeze
        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

4 entries across 4 versions & 1 rubygems

Version Path
language_server-protocol-3.14.0.2 lib/language_server/protocol/interface/document_link_options.rb
language_server-protocol-3.14.0.1 lib/language_server/protocol/interface/document_link_options.rb
language_server-protocol-3.14.0.0 lib/language_server/protocol/interface/document_link_options.rb
language_server-protocol-3.12.0.0 lib/language_server/protocol/interface/document_link_options.rb