Class: Voicemeeter::Command

Inherits:
IRemote
  • Object
show all
Includes:
Commands_Meta_Functions
Defined in:
lib/voicemeeter/command.rb

Instance Method Summary collapse

Methods included from Conversions

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

#hideObject



18
19
20
# File 'lib/voicemeeter/command.rb', line 18

def hide
  self.setter("show", 0)
end

#identifierObject



14
15
16
# File 'lib/voicemeeter/command.rb', line 14

def identifier
  :command
end

#load(value) ⇒ Object

Raises:

  • (VMRemoteErrors)


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

#resetObject



34
35
36
# File 'lib/voicemeeter/command.rb', line 34

def reset
  @remote.set_config("reset")
end

#save(value) ⇒ Object

Raises:

  • (VMRemoteErrors)


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