Sha256: d5c8e9844538df715c40749001282dbf7534da6c9b5c519b080787269c8efae6

Contents?: true

Size: 317 Bytes

Versions: 11

Compression:

Stored size: 317 Bytes

Contents

# frozen_string_literal: true

# A namespace for utilities classes and modules
module HeadMusic::Utilities; end

# Util for converting an object to a consistent hash key
module HeadMusic::Utilities::HashKey
  def self.for(identifier)
    I18n.transliterate(identifier.to_s).downcase.gsub(/\W+/, '_').to_sym
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
head_music-0.27.0 lib/head_music/utilities/hash_key.rb
head_music-0.26.3 lib/head_music/utilities/hash_key.rb
head_music-0.26.2 lib/head_music/utilities/hash_key.rb
head_music-0.26.1 lib/head_music/utilities/hash_key.rb
head_music-0.26.0 lib/head_music/utilities/hash_key.rb
head_music-0.25.0 lib/head_music/utilities/hash_key.rb
head_music-0.24.5 lib/head_music/utilities/hash_key.rb
head_music-0.24.4 lib/head_music/utilities/hash_key.rb
head_music-0.24.3 lib/head_music/utilities/hash_key.rb
head_music-0.24.2 lib/head_music/utilities/hash_key.rb
head_music-0.24.1 lib/head_music/utilities/hash_key.rb