Class: Remitmd::A2AArtifact

Inherits:
Object
  • Object
show all
Defined in:
lib/remitmd/a2a.rb

Overview

An artifact returned by an A2A task.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ A2AArtifact

Returns a new instance of A2AArtifact.



78
79
80
81
82
83
# File 'lib/remitmd/a2a.rb', line 78

def initialize(data)
  @name  = data["name"]
  @parts = (data["parts"] || []).map do |p|
    A2AArtifactPart.new(kind: p["kind"].to_s, data: p["data"] || {})
  end
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



76
77
78
# File 'lib/remitmd/a2a.rb', line 76

def name
  @name
end

#partsObject (readonly)

Returns the value of attribute parts.



76
77
78
# File 'lib/remitmd/a2a.rb', line 76

def parts
  @parts
end