Class: SkillBench::Config::Applier
- Inherits:
-
Object
- Object
- SkillBench::Config::Applier
- Defined in:
- lib/skill_bench/config/applier.rb
Overview
Applies normalized configuration hashes to a mutable store.
Class Method Summary collapse
-
.call(store:, data:) ⇒ Hash
Applies configuration values to a store.
Instance Method Summary collapse
-
#call ⇒ Hash
Applies configuration values to the configured store.
-
#initialize(store:, data:) ⇒ Applier
constructor
Initializes the applier.
Constructor Details
#initialize(store:, data:) ⇒ Applier
Initializes the applier.
21 22 23 24 |
# File 'lib/skill_bench/config/applier.rb', line 21 def initialize(store:, data:) @store = store @data = data end |
Class Method Details
.call(store:, data:) ⇒ Hash
Applies configuration values to a store.
12 13 14 |
# File 'lib/skill_bench/config/applier.rb', line 12 def self.call(store:, data:) new(store:, data:).call end |
Instance Method Details
#call ⇒ Hash
Applies configuration values to the configured store.
29 30 31 32 33 34 35 36 |
# File 'lib/skill_bench/config/applier.rb', line 29 def call apply_scalar_values apply_provider_values { success: true, response: { applied: true } } rescue StandardError => e SkillBench::ErrorLogger.log_error(e, 'Applier Error') { success: false, response: { error: { message: e. } } } end |