From 1a3192324de75e982ca7b162153d2f29e1ee867d Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 30 Jul 2023 14:33:59 +0100 Subject: [PATCH] refactor loaders. run now returns reference to self --- lib/voicemeeter/configs.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/voicemeeter/configs.rb b/lib/voicemeeter/configs.rb index 5d1da61..d11299e 100644 --- a/lib/voicemeeter/configs.rb +++ b/lib/voicemeeter/configs.rb @@ -75,6 +75,7 @@ module Voicemeeter logger.debug "Running #{self}" configs[:reset] = build_reset_profile read_from_yml + self end end @@ -124,8 +125,7 @@ module Voicemeeter def get(kind_id) unless defined? @loaders - @loaders = Kinds::ALL.to_h { |kind| [kind.name, Loader.new(kind)] } - @loaders.each { |name, loader| loader.run } + @loaders = Kinds::ALL.to_h { |kind| [kind.name, Loader.new(kind).run] } end @loaders[kind_id].configs end