Class: ZeroMcp::PromptLoader
- Inherits:
-
Object
- Object
- ZeroMcp::PromptLoader
- Defined in:
- lib/zeromcp/scanner.rb
Overview
DSL for prompt .rb files
Instance Method Summary collapse
- #_definition ⇒ Object
-
#initialize ⇒ PromptLoader
constructor
A new instance of PromptLoader.
- #prompt(description: nil, arguments: {}) ⇒ Object
- #render(&block) ⇒ Object
Constructor Details
#initialize ⇒ PromptLoader
Returns a new instance of PromptLoader.
344 345 346 |
# File 'lib/zeromcp/scanner.rb', line 344 def initialize @definition = {} end |
Instance Method Details
#_definition ⇒ Object
357 358 359 360 |
# File 'lib/zeromcp/scanner.rb', line 357 def _definition return nil unless @definition[:render] @definition end |
#prompt(description: nil, arguments: {}) ⇒ Object
348 349 350 351 |
# File 'lib/zeromcp/scanner.rb', line 348 def prompt(description: nil, arguments: {}) @definition[:description] = description @definition[:arguments] = arguments end |
#render(&block) ⇒ Object
353 354 355 |
# File 'lib/zeromcp/scanner.rb', line 353 def render(&block) @definition[:render] = block end |