module Patch::IO::MIDI
Constants
- KEY
Key that will be used by
Patch
to identify the module
Public Instance Methods
new_from_config(config, options = {})
click to toggle source
Instantiate a MIDI
device based on the given config @param [Hash] config @param [Hash] options @option options [Log] :log @return [MIDI::Input, MIDI::Output
]
# File lib/patch/io/midi.rb, line 25 def new_from_config(config, options = {}) klass = get_direction_class(config[:direction]) klass.new(config[:id], config[:name], :log => options[:log]) end
Private Instance Methods
get_direction_class(key)
click to toggle source
Get the direction class for the given key @param [Symbol] key @return [Class]
# File lib/patch/io/midi.rb, line 35 def get_direction_class(key) case key.to_sym when :input then Input when :output then Output end end