Method: Music::Transcription::Note.add_note_method
- Defined in:
- lib/music-transcription/model/note.rb
.add_note_method(name, dur) ⇒ Object
100 101 102 103 104 |
# File 'lib/music-transcription/model/note.rb', line 100 def self.add_note_method(name, dur) self.class.send(:define_method,name.to_sym) do |pitches = [], articulation: DEFAULT_ARTICULATION, links: {}, accented: false| Note.new(dur, pitches, articulation: articulation, links: links, accented: accented) end end |