lib/head_music/clef.rb in head_music-0.27.0 vs lib/head_music/clef.rb in head_music-0.28.0
- old
+ new
@@ -1,14 +1,14 @@
# frozen_string_literal: true
-require 'yaml'
+require "yaml"
# A clef assigns pitches to the lines and spaces of a staff.
class HeadMusic::Clef
include HeadMusic::Named
- RECORDS = YAML.load_file(File.expand_path('data/clefs.yml', __dir__)).freeze
+ RECORDS = YAML.load_file(File.expand_path("data/clefs.yml", __dir__)).freeze
def self.get(name)
get_by_name(name)
end
@@ -95,9 +95,9 @@
@alias_name_keys = [record[:alias_name_keys]].flatten.compact
end
def initialize_musical_symbols(list)
@musical_symbols = (list || []).map do |symbol_data|
- HeadMusic::MusicalSymbol.new(symbol_data.slice(:ascii, :html_entity, :unicode))
+ HeadMusic::MusicalSymbol.new(**symbol_data.slice(:ascii, :html_entity, :unicode))
end
end
end