move KindEnum

This commit is contained in:
onyx-and-iris 2023-08-09 16:06:55 +01:00
parent 8943c1bedc
commit c9c2b906c5
2 changed files with 7 additions and 9 deletions

View File

@ -4,6 +4,13 @@ module Voicemeeter
private private
module KindEnum
BASIC = 1
BANANA = 2
POTATO = 3
POTATOX64 = 6
end
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[0]
@ -33,13 +40,6 @@ module Voicemeeter
KIND_MAPS = [basic, banana, potato].to_h { |kind| [kind.name, kind] } KIND_MAPS = [basic, banana, potato].to_h { |kind| [kind.name, kind] }
module KindEnum
BASIC = 1
BANANA = 2
POTATO = 3
POTATOX64 = 6
end
public public
def get(kind_id) def get(kind_id)

View File

@ -107,8 +107,6 @@ module Voicemeeter
end end
end end
public
def self.new(kind_id, **) def self.new(kind_id, **)
# Interface entry point. Wraps factory class and handles kind errors. # Interface entry point. Wraps factory class and handles kind errors.
kind = Kinds.get(kind_id) kind = Kinds.get(kind_id)