Skip to content

Commit

Permalink
Add connected? method to runner client
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Jan 29, 2025
1 parent 99dace1 commit 634d6eb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/ruby_lsp/ruby_lsp_rails/runner_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,13 @@ def stopped?
[@stdin, @stdout, @stderr].all?(&:closed?) && !@wait_thread.alive?
end

sig { returns(T::Boolean) }
def connected?
true
end

private

sig do
params(
request: String,
Expand All @@ -288,8 +295,6 @@ def make_request(request, **params)
sig { params(request: String, params: T.untyped).void }
def send_notification(request, **params) = send_message(request, **params)

private

sig { overridable.params(request: String, params: T.untyped).void }
def send_message(request, **params)
message = { method: request }
Expand Down Expand Up @@ -398,6 +403,11 @@ def rails_root
Dir.pwd
end

sig { returns(T::Boolean) }
def connected?
false
end

private

sig { params(message: ::String, type: ::Integer).void }
Expand Down

0 comments on commit 634d6eb

Please sign in to comment.