mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-24 10:50:49 +00:00
refactor loaders.
run now returns reference to self
This commit is contained in:
parent
f60b7d6622
commit
1a3192324d
@ -75,6 +75,7 @@ module Voicemeeter
|
|||||||
logger.debug "Running #{self}"
|
logger.debug "Running #{self}"
|
||||||
configs[:reset] = build_reset_profile
|
configs[:reset] = build_reset_profile
|
||||||
read_from_yml
|
read_from_yml
|
||||||
|
self
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -124,8 +125,7 @@ module Voicemeeter
|
|||||||
|
|
||||||
def get(kind_id)
|
def get(kind_id)
|
||||||
unless defined? @loaders
|
unless defined? @loaders
|
||||||
@loaders = Kinds::ALL.to_h { |kind| [kind.name, Loader.new(kind)] }
|
@loaders = Kinds::ALL.to_h { |kind| [kind.name, Loader.new(kind).run] }
|
||||||
@loaders.each { |name, loader| loader.run }
|
|
||||||
end
|
end
|
||||||
@loaders[kind_id].configs
|
@loaders[kind_id].configs
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user