Module: Voicemeeter::Remote

Extended by:
Logging
Defined in:
lib/voicemeeter/remote.rb

Defined Under Namespace

Classes: Remote, RemoteBanana, RemoteBasic, RemotePotato, RequestRemote

Class Method Summary collapse

Methods included from Logging

logger

Class Method Details

.new(kind_id) ⇒ Object

Interface entry point. Wraps factory class and handles kind errors.



93
94
95
96
97
98
99
100
# File 'lib/voicemeeter/remote.rb', line 93

def self.new(kind_id, **)
  kind = Kinds.get(kind_id)
rescue KeyError => e
  logger.error "#{e.class.name}: #{e.message}"
  raise Errors::VMError.new "unknown Voicemeeter kind '#{kind_id}'"
else
  RequestRemote.for(kind, **)
end