From 33bf0d9d5c0b365c56ec80c9dcba03ffcf7152aa Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Tue, 25 Jul 2023 14:54:16 +0100 Subject: [PATCH] use instance_variable_set in Remote initialize --- lib/voicemeeter/remote.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/voicemeeter/remote.rb b/lib/voicemeeter/remote.rb index 471c605..6ba07e9 100644 --- a/lib/voicemeeter/remote.rb +++ b/lib/voicemeeter/remote.rb @@ -42,11 +42,10 @@ module Voicemeeter include Builder public attr_reader :strip, :bus, :button, :vban, :command, :device, :option - private attr_writer :strip, :bus, :button, :vban, :command, :device, :option def initialize(...) super - director.each { |step| send("#{step}=", steps(step).call) } + director.each { |step| instance_variable_set("@#{step}", steps(step).call) } end def configs @@ -71,7 +70,6 @@ module Voicemeeter class RemoteBanana < Remote public attr_reader :recorder, :patch - private attr_writer :recorder, :patch private def director super.append(:recorder, :patch) @@ -80,7 +78,6 @@ module Voicemeeter class RemotePotato < Remote public attr_reader :recorder, :patch, :fx - private attr_writer :recorder, :patch, :fx private def director super.append(:recorder, :patch, :fx)