Class: Rubydex::MCPServer::Tool::Response
- Inherits:
-
Object
- Object
- Rubydex::MCPServer::Tool::Response
- Defined in:
- lib/rubydex/mcp_server/protocol.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
-
#error? ⇒ Boolean
: -> bool.
-
#initialize(content, error: false) ⇒ Response
constructor
: (Array, ?bool) -> void.
-
#to_h ⇒ Object
: -> Hash.
Constructor Details
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
57 58 59 |
# File 'lib/rubydex/mcp_server/protocol.rb', line 57 def content @content end |
Instance Method Details
#error? ⇒ Boolean
: -> bool
60 61 62 |
# File 'lib/rubydex/mcp_server/protocol.rb', line 60 def error? @error end |
#to_h ⇒ Object
: -> Hash
65 66 67 68 69 70 |
# File 'lib/rubydex/mcp_server/protocol.rb', line 65 def to_h { content: content, isError: error?, } end |