Module: HeadMusic::Utilities::HashKey

Defined in:
lib/head_music/utilities/hash_key.rb

Overview

Util for converting an object to a consistent hash key

Class Method Summary collapse

Class Method Details

.for(identifier) ⇒ Object



6
7
8
# File 'lib/head_music/utilities/hash_key.rb', line 6

def self.for(identifier)
  I18n.transliterate(identifier.to_s).downcase.gsub(/\W+/, "_").to_sym
end