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.
-
#mime_type ⇒ Object
readonly
Returns the value of attribute mime_type.
Instance Method Summary collapse
-
#initialize(data, mime_type, annotations: nil) ⇒ Audio
constructor
A new instance of Audio.
- #to_h ⇒ Object
Constructor Details
#initialize(data, mime_type, annotations: nil) ⇒ Audio
Returns a new instance of Audio.
35 36 37 38 39 |
# File 'lib/mcp/content.rb', line 35 def initialize(data, mime_type, annotations: nil) @data = data @mime_type = mime_type @annotations = annotations end |
Instance Attribute Details
#annotations ⇒ Object (readonly)
Returns the value of attribute annotations.
33 34 35 |
# File 'lib/mcp/content.rb', line 33 def annotations @annotations end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
33 34 35 |
# File 'lib/mcp/content.rb', line 33 def data @data end |
#mime_type ⇒ Object (readonly)
Returns the value of attribute mime_type.
33 34 35 |
# File 'lib/mcp/content.rb', line 33 def mime_type @mime_type end |
Instance Method Details
#to_h ⇒ Object
41 42 43 |
# File 'lib/mcp/content.rb', line 41 def to_h { data: data, mimeType: mime_type, annotations: annotations, type: "audio" }.compact end |