Module: Voicemeeter::IRemote

Overview

Common interface with the base Remote class.

Instance Method Summary collapse

Methods included from Logging

#logger

Instance Method Details

#apply(params) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/voicemeeter/iremote.rb', line 37

def apply(params)
  params.each do |key, val|
    if val.is_a? Hash
      target = public_send(key)
      target.apply(val)
    elsif key == :mode
      mode.public_send("#{val}=", true)
    else
      public_send("#{key}=", val)
    end
  end
end

#initialize(remote, i = nil) ⇒ Object



6
7
8
9
# File 'lib/voicemeeter/iremote.rb', line 6

def initialize(remote, i = nil)
  @remote = remote
  @index = i
end

#to_sObject



11
12
13
# File 'lib/voicemeeter/iremote.rb', line 11

def to_s
  "#{self.class.name.split("::").last}#{@index}#{@remote.kind}"
end