Class: MCP::Content::Audio
- Inherits:
-
Object
- Object
- MCP::Content::Audio
- Defined in:
- lib/mcp/content.rb
Instance Attribute Summary collapse
-
#annotations ⇒ Object
readonly
Returns the value of attribute annotations.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
-
#mime_type ⇒ Object
readonly
Returns the value of attribute mime_type.
Instance Method Summary collapse
-
#initialize(data, mime_type, annotations: nil, meta: nil) ⇒ Audio
constructor
A new instance of Audio.
- #to_h ⇒ Object
Constructor Details
#initialize(data, mime_type, annotations: nil, meta: nil) ⇒ Audio
Returns a new instance of Audio.
37 38 39 40 41 42 |
# File 'lib/mcp/content.rb', line 37 def initialize(data, mime_type, annotations: nil, meta: nil) @data = data @mime_type = mime_type @annotations = annotations @meta = end |
Instance Attribute Details
#annotations ⇒ Object (readonly)
Returns the value of attribute annotations.
35 36 37 |
# File 'lib/mcp/content.rb', line 35 def annotations @annotations end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
35 36 37 |
# File 'lib/mcp/content.rb', line 35 def data @data end |
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
35 36 37 |
# File 'lib/mcp/content.rb', line 35 def @meta end |
#mime_type ⇒ Object (readonly)
Returns the value of attribute mime_type.
35 36 37 |
# File 'lib/mcp/content.rb', line 35 def mime_type @mime_type end |
Instance Method Details
#to_h ⇒ Object
44 45 46 |
# File 'lib/mcp/content.rb', line 44 def to_h { data: data, mimeType: mime_type, annotations: annotations, _meta: , type: "audio" }.compact end |