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