Class: RubynCode::IDE::Handlers::PlanInterviewCancelHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyn_code/ide/handlers/plan_interview_cancel_handler.rb

Overview

Handles “plan/interview/cancel” — drops the named InterviewSession. Notification handler (no id), so it never sends a response. Unknown sessionIds are no-ops; the extension treats cancel as best-effort.

Instance Method Summary collapse

Constructor Details

#initialize(server) ⇒ PlanInterviewCancelHandler

Returns a new instance of PlanInterviewCancelHandler.



10
11
12
# File 'lib/rubyn_code/ide/handlers/plan_interview_cancel_handler.rb', line 10

def initialize(server)
  @server = server
end

Instance Method Details

#call(params) ⇒ Object



14
15
16
17
18
# File 'lib/rubyn_code/ide/handlers/plan_interview_cancel_handler.rb', line 14

def call(params)
  session_id = params['sessionId'].to_s
  @server.drop_interview_session(session_id)
  nil
end