module UniMIDI::Command

Module for command-line use of UniMIDI. Used by the bin/unimidi script

Public Instance Methods

exec(command, options = {}) click to toggle source

Execute a command @param [Symbol] command @param [Hash] options @return [Boolean]

# File lib/unimidi/command.rb, line 12
def exec(command, options = {})
  if [:l, :list, :list_devices].include?(command)
    puts "input:"
    Input.list
    puts "output:"
    Output.list
    true
  else
    raise "Command #{command.to_s} not found"
  end   
end