mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-25 19:30:47 +00:00
apply extended to handle bus modes
This commit is contained in:
parent
416a69113a
commit
5dbf3e547c
@ -30,7 +30,7 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def _cmd(param)
|
def _cmd(param)
|
||||||
param.empty? ? self.identifier : "#{self.identifier}.#{param}"
|
param.empty? ? identifier : "#{identifier}.#{param}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def identifier
|
def identifier
|
||||||
@ -42,11 +42,15 @@ module Voicemeeter
|
|||||||
if val.is_a? Hash
|
if val.is_a? Hash
|
||||||
target = self.send(key)
|
target = self.send(key)
|
||||||
target.apply(val)
|
target.apply(val)
|
||||||
|
else
|
||||||
|
if key == :mode
|
||||||
|
self.mode.send("#{val}=", true)
|
||||||
else
|
else
|
||||||
self.send("#{key}=", val)
|
self.send("#{key}=", val)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def method_missing(method, *args)
|
def method_missing(method, *args)
|
||||||
logger.debug "Unknown method #{method} for #{self}."
|
logger.debug "Unknown method #{method} for #{self}."
|
||||||
|
Loading…
Reference in New Issue
Block a user