Class: Voicemeeter::Command
Instance Method Summary
collapse
Boolean
Methods inherited from IRemote
#getter, #set_multi, #setter, #to_s
Constructor Details
#initialize(remote) ⇒ Command
Returns a new instance of Command.
8
9
10
11
12
|
# File 'lib/voicemeeter/command.rb', line 8
def initialize(remote)
super
self.make_action_prop :show, :restart, :shutdown
self.make_writer_bool :showvbanchat, :lock
end
|
Instance Method Details
#hide ⇒ Object
18
19
20
|
# File 'lib/voicemeeter/command.rb', line 18
def hide
self.setter("show", 0)
end
|
#identifier ⇒ Object
14
15
16
|
# File 'lib/voicemeeter/command.rb', line 14
def identifier
:command
end
|
#load(value) ⇒ Object
22
23
24
25
26
|
# File 'lib/voicemeeter/command.rb', line 22
def load(value)
raise VMRemoteErrors.new("Expected a string") unless value.is_a? String
self.setter("load", value)
sleep(0.2)
end
|
#reset ⇒ Object
34
35
36
|
# File 'lib/voicemeeter/command.rb', line 34
def reset
@remote.set_config("reset")
end
|
#save(value) ⇒ Object
28
29
30
31
32
|
# File 'lib/voicemeeter/command.rb', line 28
def save(value)
raise VMRemoteErrors.new("Expected a string") unless value.is_a? String
self.setter("save", value)
sleep(0.2)
end
|