Class: Manceps::Prompt

Inherits:
Object
  • Object
show all
Defined in:
lib/manceps/prompt.rb

Overview

An MCP prompt definition.

Defined Under Namespace

Classes: Argument

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Prompt

Returns a new instance of Prompt.



8
9
10
11
12
13
# File 'lib/manceps/prompt.rb', line 8

def initialize(data)
  @name = data['name']
  @description = data['description']
  @title = data['title']
  @arguments = (data['arguments'] || []).map { |a| Argument.new(a) }
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



6
7
8
# File 'lib/manceps/prompt.rb', line 6

def arguments
  @arguments
end

#descriptionObject (readonly)

Returns the value of attribute description.



6
7
8
# File 'lib/manceps/prompt.rb', line 6

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/manceps/prompt.rb', line 6

def name
  @name
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/manceps/prompt.rb', line 6

def title
  @title
end