Sha256: 2497f3b9969882320eb9166929bbbcdd274a5b1091795a520afcc47f309987c5

Contents?: true

Size: 1.07 KB

Versions: 110

Compression:

Stored size: 1.07 KB

Contents

module LanguageServer
  module Protocol
    module Interface
      #
      # Represents a related message and source code location for a diagnostic.
      # This should be used to point to code locations that cause or are related to
      # a diagnostics, e.g when duplicating a symbol in a scope.
      #
      class DiagnosticRelatedInformation
        def initialize(location:, message:)
          @attributes = {}

          @attributes[:location] = location
          @attributes[:message] = message

          @attributes.freeze
        end

        #
        # The location of this related diagnostic information.
        #
        # @return [Location]
        def location
          attributes.fetch(:location)
        end

        #
        # The message of this related diagnostic information.
        #
        # @return [string]
        def message
          attributes.fetch(:message)
        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

110 entries across 110 versions & 15 rubygems

Version Path
siteimprove_api_client-1.0.1 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.4/lib/language_server/protocol/interface/diagnostic_related_information.rb
tailscale_middleware-0.0.3 vendor/cache/ruby/3.4.0/gems/language_server-protocol-3.17.0.4/lib/language_server/protocol/interface/diagnostic_related_information.rb
language_server-protocol-3.17.0.4 lib/language_server/protocol/interface/diagnostic_related_information.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
bison-0.1.0 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
study_line-0.2.7 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
study_line-0.2.6 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
study_line-0.2.5 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
study_line-0.2.4 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
study_line-0.2.3 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
study_line-0.2.2 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
study_line-0.2.1 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
study_line-0.2.0 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/diagnostic_related_information.rb