Exception: Spoom::LSP::ResponseError

Inherits:
Error
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/spoom/sorbet/lsp/errors.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message, data) ⇒ ResponseError

Returns a new instance of ResponseError.



57
58
59
60
61
# File 'lib/spoom/sorbet/lsp/errors.rb', line 57

def initialize(code, message, data)
  @code = code
  @message = message
  @data = data
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



39
40
41
# File 'lib/spoom/sorbet/lsp/errors.rb', line 39

def code
  @code
end

#dataObject (readonly)

Returns the value of attribute data.



45
46
47
# File 'lib/spoom/sorbet/lsp/errors.rb', line 45

def data
  @data
end

#messageObject (readonly)

Returns the value of attribute message.



42
43
44
# File 'lib/spoom/sorbet/lsp/errors.rb', line 42

def message
  @message
end

Class Method Details

.from_json(json) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/spoom/sorbet/lsp/errors.rb', line 48

def self.from_json(json)
  ResponseError.new(
    json['code'],
    json['message'],
    json['data']
  )
end