Sha256: 499229eaec72f5badcaa5c5f3554e460efceea21b2b33c83c7c7b38c5fd508c4
Contents?: true
Size: 923 Bytes
Versions: 15
Compression:
Stored size: 923 Bytes
Contents
# typed: true # frozen_string_literal: true module Spoom module LSP class Error < StandardError class AlreadyOpen < Error; end class BadHeaders < Error; end class Diagnostics < Error attr_reader :uri, :diagnostics def self.from_json(json) Diagnostics.new( json['uri'], json['diagnostics'].map { |d| Diagnostic.from_json(d) } ) end def initialize(uri, diagnostics) @uri = uri @diagnostics = diagnostics end end end class ResponseError < Error attr_reader :code, :message, :data def self.from_json(json) ResponseError.new( json['code'], json['message'], json['data'] ) end def initialize(code, message, data) @code = code @message = message @data = data end end end end
Version data entries
15 entries across 15 versions & 1 rubygems