lib/head_music/solmization.rb in head_music-0.27.0 vs lib/head_music/solmization.rb in head_music-0.28.0
- old
+ new
@@ -3,13 +3,13 @@
# A scale degree is a number indicating the ordinality of the spelling in the key signature.
# TODO: Rewrite to accept a tonal_center and a scale type.
class HeadMusic::Solmization
include HeadMusic::Named
- DEFAULT_SOLMIZATION = 'solfège'
+ DEFAULT_SOLMIZATION = "solfège"
- RECORDS = YAML.load_file(File.expand_path('solmizations.yml', __dir__)).freeze
+ RECORDS = YAML.load_file(File.expand_path("solmizations.yml", __dir__)).freeze
attr_reader :syllables
def self.get(identifier = nil)
get_by_name(identifier)
@@ -44,9 +44,9 @@
initialize_localized_names(record[:localized_names])
end
def initialize_localized_names(list)
@localized_names = (list || []).map do |name_attributes|
- HeadMusic::Named::LocalizedName.new(name_attributes.slice(:name, :locale_code, :abbreviation))
+ HeadMusic::Named::LocalizedName.new(**name_attributes.slice(:name, :locale_code, :abbreviation))
end
end
end