lib/head_music/clef.rb in head_music-0.17.0 vs lib/head_music/clef.rb in head_music-0.18.0
- old
+ new
@@ -1,5 +1,8 @@
+# frozen_string_literal: true
+
+# A clef assigns pitches to the lines and spaces of a staff.
class HeadMusic::Clef
include HeadMusic::NamedRudiment
CLEFS = [
{ pitch: 'G4', line: 2, names: ['treble', 'G-clef'], modern: true },
@@ -14,11 +17,11 @@
{ pitch: 'C4', line: 2, names: ['mezzo-soprano'] },
{ pitch: 'C4', line: 3, names: ['alto', 'viola', 'counter-tenor', 'countertenor'], modern: true },
{ pitch: 'C4', line: 4, names: ['tenor'], modern: true },
{ pitch: 'C4', line: 5, names: ['baritone'] },
- { pitch: nil, line: 3, names: ['neutral', 'percussion'] }
- ]
+ { pitch: nil, line: 3, names: %w[neutral percussion] },
+ ].freeze
def self.get(name)
get_by_name(name)
end