Module: StepUp::NotesArray

Defined in:
lib/step-up/ranged_notes.rb

Instance Method Summary collapse

Instance Method Details

#as_hashObject



191
192
193
194
195
196
197
198
# File 'lib/step-up/ranged_notes.rb', line 191

def as_hash
  notes = {}.extend NotesHash
  each do |note|
    notes[note[1]] ||= []
    notes[note[1]] << [note[3], note[4], note[2]] unless notes[note[1]].any?{ |n| n[0] == note[3] }
  end
  notes
end