Class: ComposableAgents::RunInfo
- Inherits:
-
Object
- Object
- ComposableAgents::RunInfo
- Defined in:
- lib/composable_agents/run_info.rb
Overview
Store runtime information about a run
Instance Method Summary collapse
-
#initialize ⇒ RunInfo
constructor
Constructor.
-
#publish(**kwargs) ⇒ Object
Publish properties.
Constructor Details
#initialize ⇒ RunInfo
Constructor
5 6 7 |
# File 'lib/composable_agents/run_info.rb', line 5 def initialize @properties = {} end |
Instance Method Details
#publish(**kwargs) ⇒ Object
Publish properties
12 13 14 15 16 17 |
# File 'lib/composable_agents/run_info.rb', line 12 def publish(**kwargs) kwargs.each do |name, value| @properties[name] = value singleton_class.define_method(name) { @properties.fetch(name) } unless singleton_class.respond_to?(name) end end |