Sha256: ef6b4e29eab2ebfeb211c7f167f8db5b7f0778dbc9198d39397f409111c5a920
Contents?: true
Size: 442 Bytes
Versions: 1
Compression:
Stored size: 442 Bytes
Contents
module PM # Filters are blocks of code executed by a Connection to modify incoming # MIDI bytes. Since we want to save them to files, we store the text # representation as well. class Filter attr_accessor :block, :text def initialize(block, text=nil) @block, @text = block, text end def call(conn, bytes) @block.call(conn, bytes) end def to_s (@text || '# no block text found').gsub(/\n\s*/, "; ") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
patchmaster-1.0.0 | lib/patchmaster/filter.rb |