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