use first,last array methods

This commit is contained in:
onyx-and-iris 2023-08-27 21:36:44 +01:00
parent f594f2a9a0
commit 54693ed76f

View File

@ -13,13 +13,13 @@ module Voicemeeter
KindMap = KindMap =
Data.define(:name, :ins, :outs, :vban, :asio, :insert, :num_buttons) do Data.define(:name, :ins, :outs, :vban, :asio, :insert, :num_buttons) do
def phys_in = ins[0] def phys_in = ins.first
def virt_in = ins[1] def virt_in = ins.last
def phys_out = outs[0] def phys_out = outs.first
def virt_out = outs[1] def virt_out = outs.last
def num_strip = ins.sum def num_strip = ins.sum