Adds .get_by_name to the including class.
52 53 54 55 56 57
# File 'lib/head_music/named.rb', line 52 def get_by_name(name) name = name.to_s @instances ||= {} key = HeadMusic::Utilities::HashKey.for(name) @instances[key] ||= new(name) end