Sha256: b041ed6e05aaceb1578e0ed44c87979c18bfee208013fdf5198c11bb08616566

Contents?: true

Size: 297 Bytes

Versions: 12

Compression:

Stored size: 297 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)
    identifier.to_s.downcase.gsub(/\W+/, '_').to_sym
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
head_music-0.24.0 lib/head_music/utilities/hash_key.rb
head_music-0.23.4 lib/head_music/utilities/hash_key.rb
head_music-0.23.3 lib/head_music/utilities/hash_key.rb
head_music-0.23.2 lib/head_music/utilities/hash_key.rb
head_music-0.23.1 lib/head_music/utilities/hash_key.rb
head_music-0.23.0 lib/head_music/utilities/hash_key.rb
head_music-0.22.0 lib/head_music/utilities/hash_key.rb
head_music-0.20.0 lib/head_music/utilities/hash_key.rb
head_music-0.19.2 lib/head_music/utilities/hash_key.rb
head_music-0.19.1 lib/head_music/utilities/hash_key.rb
head_music-0.19.0 lib/head_music/utilities/hash_key.rb
head_music-0.18.0 lib/head_music/utilities/hash_key.rb