Class: RubyLLM::MCP::Attachment

Inherits:
Attachment
  • Object
show all
Defined in:
lib/ruby_llm/mcp/attachment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, mime_type) ⇒ Attachment

rubocop:disable Lint/MissingSuper



8
9
10
11
# File 'lib/ruby_llm/mcp/attachment.rb', line 8

def initialize(content, mime_type) # rubocop:disable Lint/MissingSuper
  @content = content
  @mime_type = mime_type
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



6
7
8
# File 'lib/ruby_llm/mcp/attachment.rb', line 6

def content
  @content
end

#mime_typeObject (readonly)

Returns the value of attribute mime_type.



6
7
8
# File 'lib/ruby_llm/mcp/attachment.rb', line 6

def mime_type
  @mime_type
end

Instance Method Details

#encodedObject



13
14
15
# File 'lib/ruby_llm/mcp/attachment.rb', line 13

def encoded
  @content
end