Class: Ad::AgentArchitecture::Report::AgentDataBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/ad/agent_architecture/report/agent_data_builder.rb

Overview

This class is responsible for building the agent data for export or visualization

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workflow_id) ⇒ AgentDataBuilder

Returns a new instance of AgentDataBuilder.



10
11
12
13
# File 'lib/ad/agent_architecture/report/agent_data_builder.rb', line 10

def initialize(workflow_id)
  @workflow_id = workflow_id
  @data = {}
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



8
9
10
# File 'lib/ad/agent_architecture/report/agent_data_builder.rb', line 8

def data
  @data
end

#workflow_idObject (readonly)

Returns the value of attribute workflow_id.



8
9
10
# File 'lib/ad/agent_architecture/report/agent_data_builder.rb', line 8

def workflow_id
  @workflow_id
end

Instance Method Details

#buildObject



15
16
17
18
19
20
21
# File 'lib/ad/agent_architecture/report/agent_data_builder.rb', line 15

def build
  fetch_workflow
  fetch_sections
  fetch_attributes
  fetch_prompts
  data
end