syntax changes

This commit is contained in:
onyx-and-iris 2023-07-31 15:04:34 +01:00
parent 1a3192324d
commit af55e8ce1f

View File

@ -45,7 +45,7 @@ module Voicemeeter
def info(msg = nil) def info(msg = nil)
info_msg = msg ? ["#{msg} events."] : [] info_msg = msg ? ["#{msg} events."] : []
info_msg += if any? info_msg << if any?
["Now listening for #{get.join(", ")} events"] ["Now listening for #{get.join(", ")} events"]
else else
["Not listening for any events"] ["Not listening for any events"]
@ -57,7 +57,7 @@ module Voicemeeter
params.each do |param| params.each do |param|
define_singleton_method("#{param}=") do |value| define_singleton_method("#{param}=") do |value|
instance_variable_set("@#{param}", value) instance_variable_set("@#{param}", value)
info("#{param} #{send(param) ? "added to" : "removed from"}") info("#{param} #{value ? "added to" : "removed from"}")
end end
end end
end end