lib/head_music/instrument.rb in head_music-0.17.0 vs lib/head_music/instrument.rb in head_music-0.18.0
- old
+ new
@@ -1,19 +1,22 @@
+# frozen_string_literal: true
+
+# An instrument can be assigned to a staff.
class HeadMusic::Instrument
include HeadMusic::NamedRudiment
INSTRUMENTS = {
violin: {
- name: "violin",
+ name: 'violin',
family: :string,
- default_clef: :treble
+ default_clef: :treble,
},
piano: {
- name: "piano",
+ name: 'piano',
family: :string,
- default_system: [:treble, :bass]
- }
- }
+ default_system: %i[treble bass],
+ },
+ }.freeze
def self.get(name)
get_by_name(name)
end