Module: RubyLLM::MCP::Handlers::Concerns::AsyncExecution::ClassMethods
- Defined in:
- lib/ruby_llm/mcp/handlers/concerns/async_execution.rb
Instance Attribute Summary collapse
-
#async_timeout ⇒ Object
readonly
Get async timeout.
Instance Method Summary collapse
-
#async? ⇒ Boolean
Check if handler is async.
-
#async_execution(timeout: nil) ⇒ Object
Mark this handler as async (returns pending response).
-
#inherited(subclass) ⇒ Object
Inherit async settings from parent classes.
Instance Attribute Details
#async_timeout ⇒ Object (readonly)
Get async timeout
27 28 29 |
# File 'lib/ruby_llm/mcp/handlers/concerns/async_execution.rb', line 27 def async_timeout @async_timeout end |
Instance Method Details
#async? ⇒ Boolean
Check if handler is async
22 23 24 |
# File 'lib/ruby_llm/mcp/handlers/concerns/async_execution.rb', line 22 def async? @async == true end |
#async_execution(timeout: nil) ⇒ Object
Mark this handler as async (returns pending response)
16 17 18 19 |
# File 'lib/ruby_llm/mcp/handlers/concerns/async_execution.rb', line 16 def async_execution(timeout: nil) @async = true @async_timeout = timeout if timeout end |
#inherited(subclass) ⇒ Object
Inherit async settings from parent classes
30 31 32 33 34 |
# File 'lib/ruby_llm/mcp/handlers/concerns/async_execution.rb', line 30 def inherited(subclass) super subclass.instance_variable_set(:@async, @async) subclass.instance_variable_set(:@async_timeout, @async_timeout) end |