Class: RubyLsp::Result
- Inherits:
-
Object
- Object
- RubyLsp::Result
- Defined in:
- lib/ruby_lsp/utils.rb
Overview
The final result of running a request before its IO is finalized
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
: Integer.
-
#response ⇒ Object
readonly
: untyped.
Instance Method Summary collapse
-
#initialize(id:, response:) ⇒ Result
constructor
: (id: Integer, response: untyped) -> void.
-
#to_hash ⇒ Object
: -> Hash[Symbol, untyped].
Constructor Details
#initialize(id:, response:) ⇒ Result
: (id: Integer, response: untyped) -> void
237 238 239 240 |
# File 'lib/ruby_lsp/utils.rb', line 237 def initialize(id:, response:) @id = id @response = response end |
Instance Attribute Details
#id ⇒ Object (readonly)
: Integer
234 235 236 |
# File 'lib/ruby_lsp/utils.rb', line 234 def id @id end |
#response ⇒ Object (readonly)
: untyped
231 232 233 |
# File 'lib/ruby_lsp/utils.rb', line 231 def response @response end |
Instance Method Details
#to_hash ⇒ Object
: -> Hash[Symbol, untyped]
243 244 245 |
# File 'lib/ruby_lsp/utils.rb', line 243 def to_hash { id: @id, result: @response } end |