Überprüfen Sie, ob die Schlüssel eines Hash alle Schlüssel enthalten
Ich suche nach einem besseren Weg
if hash.key? :a &&
hash.key? :b &&
hash.key? :c &&
hash.key? :d
am liebsten sowas
hash.includes_keys? [ :a, :b, :c, :d ]
Ich hatte die Idee dass
hash.keys & [:a, :b, :c, :d] == [:a, :b, :c, :d]
Aber ich möchte das Array nicht zweimal hinzufügen