module AlsaRawMIDI::Device
Functionality common to both inputs and outputs
Attributes
enabled[R]
enabled?[R]
id[R]
name[R]
subname[R]
system_id[R]
type[R]
Public Class Methods
included(base)
click to toggle source
# File lib/alsa-rawmidi/device.rb, line 73 def self.included(base) base.send(:extend, ClassMethods) end
new(options = {})
click to toggle source
@param [Hash] options @option options [Integer] :id @option options [String] :name @option options [String] :subname @option options [String] :system_id
# File lib/alsa-rawmidi/device.rb, line 82 def initialize(options = {}) @id = options[:id] @name = options[:name] @subname = options[:subname] @system_id = options[:system_id] @type = get_type @enabled = false end
Private Instance Methods
get_type()
click to toggle source
Get the device type @return [Symbol]
# File lib/alsa-rawmidi/device.rb, line 102 def get_type self.class.name.split('::').last.downcase.to_sym end
id=(id)
click to toggle source
Assign an id @param [Integer] id @return [Integer]
# File lib/alsa-rawmidi/device.rb, line 96 def id=(id) @id = id end