Module: UniMIDI::Command
- Defined in:
- lib/unimidi/command.rb
Overview
Module for command-line use of UniMIDI. Used by the bin/unimidi script
Class Method Summary collapse
-
.exec(command, _options = {}) ⇒ Boolean
Execute a command.
Class Method Details
.exec(command, _options = {}) ⇒ Boolean
Execute a command
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/unimidi/command.rb', line 12 def exec(command, = {}) if %i[l list list_devices].include?(command) puts 'input:' Input.list puts 'output:' Output.list true else raise "Command #{command} not found" end end |