Class: MCP::Resource::BlobContents
- Defined in:
- lib/mcp/resource/contents.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Attributes inherited from Contents
Instance Method Summary collapse
-
#initialize(data:, uri:, mime_type:) ⇒ BlobContents
constructor
A new instance of BlobContents.
- #to_h ⇒ Object
Constructor Details
#initialize(data:, uri:, mime_type:) ⇒ BlobContents
Returns a new instance of BlobContents.
34 35 36 37 |
# File 'lib/mcp/resource/contents.rb', line 34 def initialize(data:, uri:, mime_type:) super(uri: uri, mime_type: mime_type) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
32 33 34 |
# File 'lib/mcp/resource/contents.rb', line 32 def data @data end |
Instance Method Details
#to_h ⇒ Object
39 40 41 |
# File 'lib/mcp/resource/contents.rb', line 39 def to_h super.merge(data: data) end |