mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-25 03:10:49 +00:00
use anonymouse double splat
This commit is contained in:
parent
917a591956
commit
6a21aa686a
@ -44,7 +44,7 @@ module Voicemeeter
|
|||||||
public attr_reader :strip, :bus, :button, :vban, :command, :device, :option
|
public attr_reader :strip, :bus, :button, :vban, :command, :device, :option
|
||||||
private attr_writer :strip, :bus, :button, :vban, :command, :device, :option
|
private attr_writer :strip, :bus, :button, :vban, :command, :device, :option
|
||||||
|
|
||||||
def initialize(kind, **kwargs)
|
def initialize(kind, **)
|
||||||
super
|
super
|
||||||
steps.select { |k, v| director.include? k }.each do |k, v|
|
steps.select { |k, v| director.include? k }.each do |k, v|
|
||||||
send("#{k}=", v.call)
|
send("#{k}=", v.call)
|
||||||
@ -90,26 +90,26 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
class RequestRemote
|
class RequestRemote
|
||||||
def self.for(kind, **kwargs)
|
def self.for(kind, **)
|
||||||
case kind.name
|
case kind.name
|
||||||
when :basic
|
when :basic
|
||||||
RemoteBasic.new(kind, **kwargs)
|
RemoteBasic.new(kind, **)
|
||||||
when :banana
|
when :banana
|
||||||
RemoteBanana.new(kind, **kwargs)
|
RemoteBanana.new(kind, **)
|
||||||
when :potato
|
when :potato
|
||||||
RemotePotato.new(kind, **kwargs)
|
RemotePotato.new(kind, **)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
public
|
public
|
||||||
|
|
||||||
def self.new(kind_id, **kwargs)
|
def self.new(kind_id, **)
|
||||||
kind = Kinds.get(kind_id)
|
kind = Kinds.get(kind_id)
|
||||||
rescue KeyError
|
rescue KeyError
|
||||||
raise Errors::VMError.new "unknown Voicemeeter kind #{kind_id}"
|
raise Errors::VMError.new "unknown Voicemeeter kind #{kind_id}"
|
||||||
else
|
else
|
||||||
RequestRemote.for(kind, **kwargs)
|
RequestRemote.for(kind, **)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user