Module: MIDICommunicationsWindows::Device::ClassMethods
Overview
Instance Method Summary collapse
-
#all ⇒ Array<Input>, Array<Output>
Every port of this direction.
-
#first ⇒ Input, ...
The first port of this direction, or nil if there are none.
-
#last ⇒ Input, ...
The last port of this direction, or nil if there are none.
Instance Method Details
#all ⇒ Array<Input>, Array<Output>
Every port of this direction.
WinMM is asked afresh on every call, so a port that appeared or went away since the last one is reflected. A port that is still there comes back as the same object as before; see MIDICommunicationsWindows::Device.enumerate.
69 70 71 |
# File 'lib/midi-communications-windows/device.rb', line 69 def all Device.all_by_type[direction] end |
#first ⇒ Input, ...
The first port of this direction, or nil if there are none.
75 76 77 |
# File 'lib/midi-communications-windows/device.rb', line 75 def first all.first end |
#last ⇒ Input, ...
The last port of this direction, or nil if there are none.
81 82 83 |
# File 'lib/midi-communications-windows/device.rb', line 81 def last all.last end |