Skip to content

Commit

Permalink
Alias Session send methods in WebSocketServer
Browse files Browse the repository at this point in the history
Methods ``respond``, ``respond_fail`` and ``fire_event`` can be aliased to ``send_response``, ``send_fail_response`` and ``send_event``, respectively.
  • Loading branch information
Maumagnaguagno authored Mar 7, 2023
1 parent 7a37045 commit 2070432
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions lib/debug/server_cdp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -668,17 +668,9 @@ def cleanup_reader

## Called by the SESSION thread

def respond req, **result
send_response req, **result
end

def respond_fail req, **result
send_fail_response req, **result
end

def fire_event event, **result
send_event event, **result
end
alias respond send_response
alias respond_fail send_fail_response
alias fire_event send_event

def sock skip: false
yield $stderr
Expand Down

0 comments on commit 2070432

Please sign in to comment.