def fetch_key(key)
      string_key = key.to_s
      keys.detect { |k| k.to_s.casecmp(string_key) == 0 }
    end
def fetch_key(key)
      string_key = key.to_s
      keys.detect { |k| k.to_s.casecmp(string_key) == 0 }
    end
Returns a key that matches the parameter in a case-insensitive manner.

 @param key [String, Symbol]
 @return [Symbol]