mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 23:00:48 +00:00
use maps to create higher class variables
This commit is contained in:
parent
520bab0fce
commit
06795329cc
@ -16,23 +16,28 @@ module Voicemeeter
|
|||||||
|
|
||||||
def initialize(kind, **kwargs)
|
def initialize(kind, **kwargs)
|
||||||
super
|
super
|
||||||
@strip = []
|
@strip = (0...kind.num_strip).map { |i| Strip::Strip.make(self, i) }
|
||||||
kind.num_strip.times { |i| @strip << Strip::Strip.make(self, i) }
|
@bus = (0...kind.num_bus).map { |i| Bus::Bus.make(self, i) }
|
||||||
@bus = []
|
@button = (0...kind.num_buttons).map { |i| Button::Button.new(self, i) }
|
||||||
kind.num_strip.times { |i| @bus << Bus::Bus.make(self, i) }
|
|
||||||
@button = []
|
|
||||||
kind.num_buttons.times { |i| @button << Button::Button.new(self, i) }
|
|
||||||
@vban = Vban::Vban.new(self)
|
@vban = Vban::Vban.new(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
def configs
|
def configs
|
||||||
Configs.get(@kind.name)
|
Configs.get(kind.name)
|
||||||
|
end
|
||||||
|
|
||||||
|
def run
|
||||||
|
login
|
||||||
|
|
||||||
|
yield if block_given?
|
||||||
|
|
||||||
|
logout
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
public
|
public
|
||||||
|
|
||||||
def self.make(kind_id, **kwargs)
|
def self.new(kind_id, **kwargs)
|
||||||
"
|
"
|
||||||
Factory method for remotes
|
Factory method for remotes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user