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.
342 343 344 |
# File 'lib/zeromcp/scanner.rb', line 342 def initialize @definition = {} end |
Instance Method Details
#_definition ⇒ Object
355 356 357 358 |
# File 'lib/zeromcp/scanner.rb', line 355 def _definition return nil unless @definition[:render] @definition end |
#prompt(description: nil, arguments: {}) ⇒ Object
346 347 348 349 |
# File 'lib/zeromcp/scanner.rb', line 346 def prompt(description: nil, arguments: {}) @definition[:description] = description @definition[:arguments] = arguments end |
#render(&block) ⇒ Object
351 352 353 |
# File 'lib/zeromcp/scanner.rb', line 351 def render(&block) @definition[:render] = block end |