Sha256: 01dc4463c29eecde4636e060081f2452276cf8ab2cdef8eb57aa57579173945a

Contents?: true

Size: 272 Bytes

Versions: 2

Compression:

Stored size: 272 Bytes

Contents

module Iso639
  class InsensitiveHash < Hash # :nodoc:
    def [](key)
      key.respond_to?(:downcase) ? super(key.downcase) : super(key)
    end

    def []=(key, value)
      key.respond_to?(:downcase) ? super(key.downcase, value) : super(key, value)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
iso639-1.0.1 lib/iso639/insensitive_hash.rb
iso639-1.0.0 lib/iso639/insensitive_hash.rb