Class: Smith::Workflow::Composite::EffectsBaseline
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Smith::Workflow::Composite::EffectsBaseline
- Defined in:
- lib/smith/workflow/composite/effects_baseline.rb
Instance Method Summary collapse
-
#initialize(attributes) ⇒ EffectsBaseline
constructor
A new instance of EffectsBaseline.
Constructor Details
#initialize(attributes) ⇒ EffectsBaseline
Returns a new instance of EffectsBaseline.
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/smith/workflow/composite/effects_baseline.rb', line 21 def initialize(attributes) super unless total_tokens >= 0 && total_cost.finite? && total_cost >= 0 raise ArgumentError, "composite effects baseline totals are invalid" end usage_entries.freeze tool_results.freeze budget_consumed.freeze self.attributes.freeze freeze end |