Class: PM::MockInputPort
- Inherits:
-
Object
- Object
- PM::MockInputPort
- Defined in:
- lib/patchmaster/instrument.rb
Instance Attribute Summary collapse
-
#buffer ⇒ Object
Returns the value of attribute buffer.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
-
.is_compatible?(input) ⇒ Boolean
For MIDIEye::Listener.
Instance Method Summary collapse
- #clear_buffer ⇒ Object
- #gets ⇒ Object
-
#initialize(arg) ⇒ MockInputPort
constructor
Constructor param is ignored; it’s required by MIDIEye.
- #poll {|gets| ... } ⇒ Object
Constructor Details
#initialize(arg) ⇒ MockInputPort
Constructor param is ignored; it’s required by MIDIEye.
107 108 109 110 |
# File 'lib/patchmaster/instrument.rb', line 107 def initialize(arg) @name = "MockInputPort #{arg}" @buffer = [] end |
Instance Attribute Details
#buffer ⇒ Object
Returns the value of attribute buffer.
99 100 101 |
# File 'lib/patchmaster/instrument.rb', line 99 def buffer @buffer end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
98 99 100 |
# File 'lib/patchmaster/instrument.rb', line 98 def name @name end |
Class Method Details
.is_compatible?(input) ⇒ Boolean
For MIDIEye::Listener
102 103 104 |
# File 'lib/patchmaster/instrument.rb', line 102 def self.is_compatible?(input) true end |
Instance Method Details
#clear_buffer ⇒ Object
120 121 |
# File 'lib/patchmaster/instrument.rb', line 120 def clear_buffer end |
#gets ⇒ Object
112 113 114 |
# File 'lib/patchmaster/instrument.rb', line 112 def gets [{:data => [], :timestamp => 0}] end |
#poll {|gets| ... } ⇒ Object
116 117 118 |
# File 'lib/patchmaster/instrument.rb', line 116 def poll yield gets end |