Module: Fretboard::NoteFormatter
- Defined in:
- lib/fretboard/note_formatter.rb
Class Method Summary collapse
Class Method Details
.format(note, sharp_or_flat: :both) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/fretboard/note_formatter.rb', line 5 def self.format(note, sharp_or_flat: :both) return note unless note.is_a?(Array) case sharp_or_flat when :both then note.join("/") when :sharp then note.first else note.last end end |