Foo

This is the content of the post.

1def foo(**kwargs)
2  return unless kwargs.is_a?(Hash)
3  kwargs["foo"]
4end
1def initialize(hash)
2  if !hash.is_a?(Hash) ||
3     !hash.keys.all? { |n| n.is_a?(String) } ||
4     !hash.values.all? { |a| a.is_a?(Array) } ||
5     !hash.values.all? { |a| a.all? { |v| v.is_a?(String) } }
6    raise ArgumentError,
7          "expect hash to be a map of string header names to arrays of " \
8          "header values"
9  end