Class: Ramekin::ScanForL

Inherits:
Processor show all
Defined in:
lib/ramekin/note_aggregator.rb

Instance Attribute Summary

Attributes inherited from Processor

#stream

Instance Method Summary collapse

Methods inherited from Processor

#buffer, call, compose, #each, #flush!, #next!, #peek

Instance Method Details

#call(&b) ⇒ Object



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/ramekin/note_aggregator.rb', line 177

def call(&b)
  @current_l = nil

  each do |el|
    case el.type
    when :l
      @current_l = el
    when :note, :r, :native_tie
      el.meta[:l] = @current_l
      yield el
    else
      yield el
    end
  end
end