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.
35 36 37 38 |
# File 'lib/mcp/resource/contents.rb', line 35 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.
33 34 35 |
# File 'lib/mcp/resource/contents.rb', line 33 def data @data end |
Instance Method Details
#to_h ⇒ Object
40 41 42 |
# File 'lib/mcp/resource/contents.rb', line 40 def to_h super.merge(data: data) end |