Class: RubyLsp::Error
- Inherits:
-
Object
- Object
- RubyLsp::Error
- Extended by:
- T::Sig
- Defined in:
- lib/ruby_lsp/utils.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(id:, code:, message:, data: nil) ⇒ Error
constructor
A new instance of Error.
- #to_hash ⇒ Object
Constructor Details
#initialize(id:, code:, message:, data: nil) ⇒ Error
Returns a new instance of Error.
107 108 109 110 111 112 |
# File 'lib/ruby_lsp/utils.rb', line 107 def initialize(id:, code:, message:, data: nil) @id = id @code = code @message = @data = data end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
104 105 106 |
# File 'lib/ruby_lsp/utils.rb', line 104 def @message end |
Instance Method Details
#to_hash ⇒ Object
115 116 117 118 119 120 121 122 123 124 |
# File 'lib/ruby_lsp/utils.rb', line 115 def to_hash { id: @id, error: { code: @code, message: @message, data: @data, }, } end |