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