Sha256: 5b75e6d103d0aa74feb19539fea9d083cadd93a989289e64b4e2b6827052cb41
Contents?: true
Size: 1.02 KB
Versions: 7
Compression:
Stored size: 1.02 KB
Contents
module LanguageServer module Protocol module Interfaces class ResponseError def initialize(code:, message:, data: nil) @attributes = {} @attributes[:code] = code @attributes[:message] = message @attributes[:data] = data if data @attributes.freeze end # # A number indicating the error type that occurred. # # @return [number] def code attributes.fetch(:code) end # # A string providing a short description of the error. # # @return [string] def message attributes.fetch(:message) end # # A Primitive or Structured value that contains additional # information about the error. Can be omitted. # # @return [D] def data attributes.fetch(:data) end attr_reader :attributes def to_json(*args) attributes.to_json(*args) end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems