Class: RubyLLM::MCP::Prompt::Argument
- Inherits:
-
Object
- Object
- RubyLLM::MCP::Prompt::Argument
- Defined in:
- lib/ruby_llm/mcp/prompt.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
Instance Method Summary collapse
-
#initialize(name:, description:, required:) ⇒ Argument
constructor
A new instance of Argument.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, description:, required:) ⇒ Argument
Returns a new instance of Argument.
9 10 11 12 13 |
# File 'lib/ruby_llm/mcp/prompt.rb', line 9 def initialize(name:, description:, required:) @name = name @description = description @required = required end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
7 8 9 |
# File 'lib/ruby_llm/mcp/prompt.rb', line 7 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/ruby_llm/mcp/prompt.rb', line 7 def name @name end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
7 8 9 |
# File 'lib/ruby_llm/mcp/prompt.rb', line 7 def required @required end |
Instance Method Details
#to_h ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/ruby_llm/mcp/prompt.rb', line 15 def to_h { name: @name, description: @description, required: @required } end |