mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-22 01:40:49 +00:00
use when over in, no need to pattern match
This commit is contained in:
parent
4f08ed836b
commit
0693ac8fec
@ -19,16 +19,16 @@ module Voicemeeter
|
|||||||
|
|
||||||
def steps(step)
|
def steps(step)
|
||||||
case step
|
case step
|
||||||
in :strip then -> { (0...kind.num_strip).map { Strip::Strip.make(self, _1) } }
|
when :strip then -> { (0...kind.num_strip).map { Strip::Strip.make(self, _1) } }
|
||||||
in :bus then -> { (0...kind.num_bus).map { Bus::Bus.make(self, _1) } }
|
when :bus then -> { (0...kind.num_bus).map { Bus::Bus.make(self, _1) } }
|
||||||
in :button then -> { (0...kind.num_buttons).map { Button::Button.new(self, _1) } }
|
when :button then -> { (0...kind.num_buttons).map { Button::Button.new(self, _1) } }
|
||||||
in :vban then -> { Vban::Vban.new(self) }
|
when :vban then -> { Vban::Vban.new(self) }
|
||||||
in :command then -> { Command.new(self) }
|
when :command then -> { Command.new(self) }
|
||||||
in :recorder then -> { Recorder::Recorder.new(self) }
|
when :recorder then -> { Recorder::Recorder.new(self) }
|
||||||
in :device then -> { Device.new(self) }
|
when :device then -> { Device.new(self) }
|
||||||
in :fx then -> { Fx.new(self) }
|
when :fx then -> { Fx.new(self) }
|
||||||
in :patch then -> { Patch::Patch.new(self) }
|
when :patch then -> { Patch::Patch.new(self) }
|
||||||
in :option then -> { Option::Option.new(self) }
|
when :option then -> { Option::Option.new(self) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user