Module: RubyLLM::MCP::Handlers::Concerns::Timeouts
- Included in:
- ElicitationHandler, HumanInTheLoopHandler
- Defined in:
- lib/ruby_llm/mcp/handlers/concerns/timeouts.rb
Overview
Provides timeout handling for async operations
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#handle_timeout ⇒ Object
Handle timeout event.
Class Method Details
.included(base) ⇒ Object
9 10 11 |
# File 'lib/ruby_llm/mcp/handlers/concerns/timeouts.rb', line 9 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#handle_timeout ⇒ Object
Handle timeout event
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ruby_llm/mcp/handlers/concerns/timeouts.rb', line 31 def handle_timeout handler = self.class.timeout_handler return default_timeout_action unless handler if handler.is_a?(Symbol) send(handler) else instance_exec(&handler) end end |